-
Notifications
You must be signed in to change notification settings - Fork 77
refactor(llm): route llm.default reads through resolveCallSiteConfig #30258
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 |
|---|---|---|
|
|
@@ -27,6 +27,7 @@ | |
| * a conversation offline. | ||
| */ | ||
|
|
||
| import { resolveCallSiteConfig } from "../config/llm-resolver.js"; | ||
| import { getDb } from "../memory/db-connection.js"; | ||
| import { getLogger } from "../util/logger.js"; | ||
| import { getConnection } from "./inference/connections.js"; | ||
|
|
@@ -145,8 +146,8 @@ export async function tryResolveProviderForConnectionName( | |
| export async function resolveDefaultProvider( | ||
| config: ProvidersConfig, | ||
| ): Promise<Provider | null> { | ||
| const profile = config.llm.default; | ||
| const connectionName = profile.provider_connection; | ||
| const resolved = resolveCallSiteConfig("mainAgent", config.llm); | ||
| const connectionName = resolved.provider_connection; | ||
|
Comment on lines
+149
to
+150
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.
Changing Useful? React with 👍 / 👎. |
||
| if (!connectionName) { | ||
| throw new ConnectionResolutionError( | ||
| "<llm.default>", | ||
|
|
@@ -157,6 +158,6 @@ export async function resolveDefaultProvider( | |
| return tryResolveProviderForConnectionName( | ||
| connectionName, | ||
| config, | ||
| profile.provider, | ||
| resolved.provider, | ||
| ); | ||
| } | ||
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.
🔴 Incomplete migration:
thinkingandeffortstill read from rawllm.defaultwhile sibling fields use resolved configThe PR migrates
streamThinking(line 438),speed(line 490), andcontextWindow(line 497) to read fromresolvedMainAgent(i.e.resolveCallSiteConfig("mainAgent", config.llm)), but theagentLoopConfigatassistant/src/daemon/conversation.ts:502-503still readsthinkingandeffortfrom the rawllmDefault(config.llm.default). When a user has an active profile orcallSites.mainAgentoverride that changesthinking.enabledoreffort, those overrides are respected forstreamThinkingandspeedbut silently ignored for the agent loop's actual thinking/effort wire config. For example, a profile that setsthinking: { enabled: false }would causethis.streamThinkingto befalse(resolved) butagentLoopConfig.thinking.enabledto remaintrue(raw default), leading to the model still receiving thinking instructions.Prompt for agents
Was this helpful? React with 👍 or 👎 to provide feedback.