Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion assistant/src/memory/graph/narrative.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ export async function runNarrativeRefinement(
systemPrompt,
{
config: {
modelIntent: "quality-optimized" as const,
callSite: "narrativeRefinement" as const,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚩 Behavioral change: callSite resolution injects thinking/effort/speed parameters not previously set

The old modelIntent path in providers/retry.ts:91-154 only resolved the model field — it did not inject thinking, effort, speed, temperature, or max_tokens. The new callSite path (providers/retry.ts:173-240) resolves ALL these fields from llm.default (or the call-site override). For narrative refinement and pattern scan, which previously had no max_tokens, thinking, or effort in their config objects, this means thinking.enabled: true, effort: "max", max_tokens: 64000, and speed: "standard" are now injected from llm.default. This could increase cost and latency for these background jobs. Whether this is desirable depends on whether these jobs benefit from extended thinking — they are background pattern-detection tasks where thinking may be helpful but the cost increase should be evaluated.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

tool_choice: { type: "tool" as const, name: "refine_narratives" },
},
},
Expand Down
2 changes: 1 addition & 1 deletion assistant/src/memory/graph/pattern-scan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export async function runPatternScan(
systemPrompt,
{
config: {
modelIntent: "quality-optimized" as const,
callSite: "patternScan" as const,
tool_choice: { type: "tool" as const, name: "detect_patterns" },
},
},
Expand Down
2 changes: 1 addition & 1 deletion assistant/src/memory/job-handlers/conversation-starters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ Bad → Good (incomplete phrase → complete):
systemPrompt,
{
config: {
modelIntent: "quality-optimized",
callSite: "conversationStarters" as const,
max_tokens: 2048,
tool_choice: {
type: "tool" as const,
Expand Down
2 changes: 1 addition & 1 deletion assistant/src/memory/job-handlers/summarization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ async function summarizeWithLLM(
systemPrompt,
{
config: {
modelIntent: summarizationConfig.modelIntent,
callSite: "conversationSummarization" as const,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Resolve provider by call site for this LLM request

This call now opts into callSite routing, but the function still acquires the provider via getConfiguredProvider() without passing that call-site ID, so provider selection remains pinned to services.inference.provider. In configs that set llm.callSites.conversationSummarization.provider (or a profile/provider override), the request can be sent through the wrong transport with a mismatched model/options (the retry layer notes config.provider is informational and does not reroute), which can cause provider/model errors. The same regression pattern appears in the other newly migrated call sites in this commit.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚩 memory.summarization.modelIntent config field becomes inert after this change

Before this PR, summarization.ts:192 read summarizationConfig.modelIntent dynamically from the user's config (config.memory.summarization.modelIntent). After this PR, the field is replaced with callSite: "conversationSummarization", so no runtime code reads memory.summarization.modelIntent anymore. The field still exists in config/schemas/memory-processing.ts:46-53 and passes validation, meaning users could modify it expecting it to have an effect — but it would be silently ignored. Migration 038 (workspace/migrations/038-unify-llm-callsite-configs.ts:154-166) converts the old value to llm.callSites.conversationSummarization on first run, so existing users' preferences are preserved. However, any post-migration changes to memory.summarization.modelIntent would have no effect. This is a deprecation gap — the field should either be removed (with a migration that strips it from configs) or marked deprecated with a warning.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

max_tokens: SUMMARY_MAX_TOKENS,
},
signal,
Expand Down
Loading