Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Agent Host sessions with 135 enabled tools fail the extension's 128-function guard before the model can answer. Add opt-in provider-side discovery so large host catalogs stay available while each API request carries a bounded set of schemas.
Closes #288. Related to #286: the existing guard remains when discovery is disabled; this PR does not establish or change the server-side maximum.
Behavior
experimental.toolDiscovery.enableddefaults tofalseand takes precedence over tool-list stabilization.experimental.toolDiscovery.maxToolsbounds schemas per request, including the synthetic search function: default 64, range 8–128.deepseek_search_tools. Lexical search and paginated browsing expose original schemas on subsequent requests. Evicted schemas remain discoverable. Small catalogs pass through unchanged.The catalog contains only tools supplied in the current host request. Real calls, including
activate_*calls, return unchanged to Copilot for validation, execution and approvals. A host-provided tool may be called directly from conversation context even when its schema is currently deferred or evicted; schema selection is not a separate authorization boundary.Calls absent from the host catalog never reach the host. Instead, the model receives explicit non-execution feedback and can retry with an available tool. If a response mixes unavailable and valid real calls, none of those real calls are emitted before correction; their feedback explicitly says they were not executed. Search and recovery share a maximum of four internal continuations (five API requests total). Cancellation, reasoning and tool-call correlation are preserved.
English/Chinese settings documentation and CI coverage are included. No dependencies are added. MCP server lifecycle remains with Agent Host.
Validation
git diff --checkpassed.out/provider/tools/discovery.jschanges at runtime. The initial discovery build was confirmed working by the affected user; this follow-up recovery fix still requires confirmation in their live chat after reloading VS Code.Experimental limitations
Internal continuations add billable requests and latency. Responses are buffered until each round finishes. Search is lexical, the catalog is rebuilt per provider invocation, and internal search/recovery history is not persisted in the host chat. Existing request dumps describe the initial request; per-round diagnostics and multi-request context/usage presentation still need further validation.