-
Notifications
You must be signed in to change notification settings - Fork 98
utility: route classifier and analyzer LLM calls through call-site IDs #26111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -65,7 +65,7 @@ export async function classifyInteraction( | |
| "You are a classifier. Determine whether the user's request requires computer use (controlling the GUI — clicking, scrolling, typing into app windows, navigating between apps) or can be handled with local tools (answering questions, running terminal commands, creating/editing/reading files, web searches, writing code). GUI tasks → computer_use. Everything else → text_qa.", | ||
| { | ||
| config: { | ||
| modelIntent: "latency-optimized", | ||
| callSite: "interactionClassifier", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 callSite not passed to getConfiguredProvider() in classifier — per-call-site provider overrides ignored The PR adds Prompt for agentsWas this helpful? React with 👍 or 👎 to provide feedback. |
||
| max_tokens: 128, | ||
| tool_choice: { | ||
| type: "tool" as const, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1539,7 +1539,7 @@ export async function draftSkill( | |
| [], | ||
| undefined, | ||
| { | ||
| config: { modelIntent: "latency-optimized", max_tokens: 256 }, | ||
| config: { callSite: "skillCategoryInference", max_tokens: 256 }, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 callSite not passed to getConfiguredProvider() in skills handler — per-call-site provider overrides ignored The PR adds Prompt for agentsWas this helpful? React with 👍 or 👎 to provide feedback. |
||
| signal, | ||
| }, | ||
| ); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -147,7 +147,10 @@ export async function extractStylePatterns( | |
| promptMessages, | ||
| [storeStyleAnalysisTool], | ||
| STYLE_EXTRACTION_SYSTEM_PROMPT, | ||
| { signal: AbortSignal.timeout(30_000) }, | ||
| { | ||
| signal: AbortSignal.timeout(30_000), | ||
| config: { callSite: "styleAnalyzer" }, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 callSite not passed to getConfiguredProvider() in style-analyzer — per-call-site provider overrides ignored The PR adds Prompt for agentsWas this helpful? React with 👍 or 👎 to provide feedback. |
||
| }, | ||
| ); | ||
|
|
||
| const toolBlock = response.content.find((b) => b.type === "tool_use"); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -123,7 +123,7 @@ export async function generateInviteInstruction(params: { | |
| [userMessage(prompt)], | ||
| undefined, | ||
| undefined, | ||
| { signal, config: { modelIntent: "latency-optimized" } }, | ||
| { signal, config: { callSite: "inviteInstructionGenerator" } }, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Replacing the explicit Useful? React with 👍 / 👎.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 callSite not passed to resolveConfiguredProvider() in invite-instruction-generator — per-call-site provider overrides ignored The PR adds Prompt for agentsWas this helpful? React with 👍 or 👎 to provide feedback. |
||
| ); | ||
|
|
||
| const text = extractText(response).trim(); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This call now opts into
config.callSite, but provider resolution in these paths still usesgetConfiguredProvider()/resolveConfiguredProvider()without a call-site argument. That means transport selection still followsservices.inference.provider, whileRetryProvider.normalizeViaCallSite()rewrites the model fromresolveCallSiteConfig(callSite, getConfig().llm). If those two configs diverge (which can happen aftersetModel, which only updatesservices.inference.*), the request can be sent to the wrong provider with an incompatible model ID (e.g. OpenAI transport + Claude model), causing hard failures and fallback behavior.Useful? React with 👍 / 👎.