feat(ai): defer standalone code-mode tools behind toolSearch - #1119
Closed
janburzinski wants to merge 1 commit into
Closed
janburzinski wants to merge 1 commit into
janburzinski wants to merge 1 commit into
Conversation
Contributor
|
@janburzinski is attempting to deploy a commit to the Notra Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
|
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.
Description
Adds AI SDK
toolSearch()to the standalone chat. The ~21 read-only code-mode tools (GitHub, Linear, Granola, posts, GEO, skills, web search) are now registered withdeferLoading: trueand discovered on demand via a newsearchToolstool, instead of inlining all signatures into thecode_modetool description (~15k chars / ~3.8k tokens → ~540 chars per request, multiplied by up to 50 steps per generation).withStandaloneCodeModeregisterssearchTools(callable directly and via code_mode — discovery requires a shared caller) and enablestoolDiscovery: "conversation", so discovered tools are announced in catalog messages while the provider-visible tool list stays stable for prompt cachingsearchToolscopysearchMcpTools/activateMcpTools) intentionally unchanged — it needs DB-persisted per-session activation, which per-generationtoolSearchdiscovery cannot replaceScreenshot/Recording (if applicable)
Attach a screenshot or recording of the change. This is optional, but can help reviewers understand the change. You can use Cap to record a video.
Checklist
Summary by cubic
Deploys standalone code-mode tools behind AI SDK
toolSearch, so the ~21 read-only tools are discovered on demand instead of inlined in thecode_modedescription. This cuts prompt size from ~15k chars to ~540 chars per request and keeps the provider-visible tool list stable for prompt caching.searchToolstool; the model calls it, then gets the matching tools in the next code-mode capability update.toolSearchcan't replace.Written for commit fe1f04e. Summary will update on new commits.