Skip to content

fix: учитывать отключенные tools в лимите провайдера#683

Merged
xlabtg merged 2 commits into
xlabtg:mainfrom
konard:issue-682-cb1780352ac8
Jun 30, 2026
Merged

fix: учитывать отключенные tools в лимите провайдера#683
xlabtg merged 2 commits into
xlabtg:mainfrom
konard:issue-682-cb1780352ac8

Conversation

@konard

@konard konard commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Что исправлено

Fixes #682.

Отключенные через admin panel tools больше не учитываются как активные при startup-проверке лимита провайдера и при индексации Tool RAG. При этом management API по-прежнему видит все зарегистрированные tools, чтобы отключенные элементы можно было снова включить.

Изменения

  • Добавлен активный список tools в ToolRegistry: getEnabledTools() и enabledCount исключают level: off.
  • Startup-логи, предупреждение о provider tool limit, Tool RAG indexing/status и runtime RAG-логи теперь используют активное количество tools.
  • При изменении tool access Tool RAG получает add/remove callback только когда tool реально переходит между active и off.
  • Plugin tools, уже отключенные в DB, не добавляются обратно в Tool RAG index при регистрации plugin.

Воспроизведение и тест

Регрессионные тесты создают tool с scope_level = off в tool_config и проверяют, что он остается доступен в getAll() для управления, но исключается из getEnabledTools()/enabledCount. Отдельно проверены runtime disable/enable callbacks и регистрация plugin tool, отключенного в DB.

Проверки

  • npm run typecheck
  • npm run lint
  • npm run format:check
  • npm test -- src/agent/tools/__tests__/registry.test.ts src/webui/__tests__/tools-rag-persistence.test.ts
  • npm test
  • npm run build

Замечания

Во время установки зависимостей остались существующие предупреждения npm audit/allow-scripts, а при build - существующие предупреждения Vite по lottie-web eval и крупным chunks. Они не связаны с этим исправлением.

Adding .gitkeep for PR creation (default mode).
This file will be removed when the task is complete.

Issue: xlabtg#682
@konard konard changed the title [WIP] There is a problem fix: учитывать отключенные tools в лимите провайдера Jun 29, 2026
@konard konard marked this pull request as ready for review June 29, 2026 11:12
@konard

konard commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator Author

Working session summary

Готово: исправление запушено в issue-682-cb1780352ac8, PR обновлён и переведён в ready for review.

PR: #683
Коммит: 751ff595
Статус PR: MERGEABLE, не draft.

Что сделано:

  • Отключенные tools (level: off) больше не учитываются в startup provider limit и Tool RAG indexing/status.
  • getAll() оставлен для management UI, чтобы отключенные tools можно было снова включить.
  • Добавлены регрессионные тесты на DB-disabled tools, runtime disable/enable callbacks и plugin tools, отключенные в DB.

Проверки прошли:

  • npm run typecheck
  • npm run lint
  • npm run format:check
  • focused tests
  • npm test
  • npm run build
  • PR checks в GitHub: все обязательные завершились pass; часть workflow job’ов ожидаемо skipping.

Рабочее дерево чистое.


This summary was automatically extracted from the AI working session output.

@konard

konard commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator Author

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Model: GPT-5.5
  • Provider: OpenAI
  • Public pricing estimate: $12.503953

📊 Context and tokens usage:

  • 433.1K / 200K (217%) input tokens, 28.8K / 128K (22%) output tokens

Total: (433.1K + 6.9M cached) input tokens, 28.8K output tokens, $12.503953 cost

🤖 Models used:

  • Tool: OpenAI Codex
  • Requested: gpt-5.5
  • Thinking level: max (~31999 tokens)
  • Model: GPT-5.5 (gpt-5.5)

📎 Log file uploaded as Gist (3918KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard

konard commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator Author

✅ Ready to merge

This pull request is now ready to be merged:

  • All CI checks have passed
  • No merge conflicts
  • No pending changes

Monitored by hive-mind with --auto-restart-until-mergeable flag

@xlabtg xlabtg merged commit f95db6a into xlabtg:main Jun 30, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

There is a problem

2 participants