-
Notifications
You must be signed in to change notification settings - Fork 90
workspace+conversation: route commit message and title through call-site IDs #26112
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 |
|---|---|---|
|
|
@@ -133,7 +133,7 @@ export async function generateAndPersistConversationTitle( | |
| provider, | ||
| systemPrompt: buildTitleSystemPrompt(), | ||
| tools: [], | ||
| modelIntent: "quality-optimized", | ||
| callSite: "conversationTitle", | ||
|
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. 🚩 Conversation title generation model and thinking behavior changes The conversation title service previously used More notably, the resolver also injects Was this helpful? React with 👍 or 👎 to provide feedback. |
||
| signal, | ||
| timeoutMs: 10_000, | ||
| }); | ||
|
|
@@ -236,7 +236,7 @@ export async function regenerateConversationTitle( | |
| provider, | ||
| systemPrompt: buildTitleSystemPrompt(), | ||
| tools: [], | ||
| modelIntent: "quality-optimized", | ||
| callSite: "conversationTitle", | ||
| signal, | ||
| timeoutMs: 10_000, | ||
| }); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| import type { LLMCallSite } from "../config/schemas/llm.js"; | ||
| import { buildToolDefinitions } from "../daemon/conversation-tool-setup.js"; | ||
| import { buildSystemPrompt } from "../prompts/system-prompt.js"; | ||
| import { | ||
|
|
@@ -29,6 +30,13 @@ export interface RunBtwSidechainParams { | |
| systemPrompt?: string; | ||
| tools?: ToolDefinition[]; | ||
| maxTokens?: number; | ||
| /** | ||
| * Opt-in routing through the unified LLM call-site resolver. When set, the | ||
| * provider resolves provider/model/maxTokens/etc. via | ||
| * `resolveCallSiteConfig(callSite, config.llm)` instead of `modelIntent`. | ||
| * `callSite` wins when both are passed. | ||
| */ | ||
| callSite?: LLMCallSite; | ||
| modelIntent?: ModelIntent; | ||
| signal?: AbortSignal; | ||
| timeoutMs?: number; | ||
|
|
@@ -89,7 +97,9 @@ export async function runBtwSidechain( | |
| config: { | ||
| max_tokens: params.maxTokens ?? 1024, | ||
| tool_choice: { type: "none" }, | ||
| modelIntent: params.modelIntent ?? "latency-optimized", | ||
| ...(params.callSite !== undefined | ||
| ? { callSite: params.callSite } | ||
|
Comment on lines
98
to
+101
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.
Useful? React with 👍 / 👎. |
||
| : { modelIntent: params.modelIntent ?? "latency-optimized" }), | ||
| }, | ||
| onEvent: (event) => { | ||
| if (event.type === "text_delta") { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -263,9 +263,19 @@ export class ProviderCommitMessageGenerator { | |
| { | ||
| signal: ac.signal, | ||
| config: { | ||
| // `callSite` lets the provider resolve `max_tokens` and | ||
| // `temperature` from `llm.callSites.commitMessage` (populated by | ||
| // the workspace migration from the legacy | ||
| // `workspaceGit.commitMessageLLM.{maxTokens,temperature}` keys). | ||
| // Operational fields (`enabled`, `timeoutMs`, `breaker`, | ||
| // `maxFilesInPrompt`, `maxDiffBytes`, `minRemainingTurnBudgetMs`) | ||
| // remain on `workspaceGit.commitMessageLLM` and are read above. | ||
| callSite: "commitMessage", | ||
| // `fastModel` overrides the resolver's `model` because commit | ||
|
Comment on lines
+273
to
+274
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.
This change removes the explicit Useful? React with 👍 / 👎. |
||
| // message generation enforces its own provider-specific fast | ||
| // model selection (see `PROVIDER_DEFAULT_FAST_MODELS` and | ||
| // `providerFastModelOverrides`). | ||
| model: fastModel, | ||
| max_tokens: llmConfig.maxTokens, | ||
| temperature: llmConfig.temperature, | ||
| }, | ||
|
Comment on lines
265
to
279
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. 🔴 Commit message generation loses specialized max_tokens (120→64000) and temperature (0.2→null) for users with default settings The PR removes the explicit Prompt for agentsWas this helpful? React with 👍 or 👎 to provide feedback. |
||
| }, | ||
| ); | ||
|
|
||
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.
🚩 Test mocks bypass RetryProvider resolution, hiding the max_tokens regression
The commit message generator test at
assistant/src/__tests__/provider-commit-message-generator.test.ts:77-79mocksresolveConfiguredProviderto return a bare mock provider (not aRetryProvider). This meanscallSiteresolution vianormalizeViaCallSitenever runs in the test. The test at line 243 only verifies thatcallSite: "commitMessage"is present in the config object, not that the resolution produces correctmax_tokens/temperaturevalues. This is why the regression from the reported bug passes tests — the test doesn't exercise the production code path whereRetryProviderresolvescallSiteinto concrete config values.Was this helpful? React with 👍 or 👎 to provide feedback.