Skip to content

fix(llm-callsite): seed latency-optimized callsites on fresh install#26477

Merged
siddseethepalli merged 1 commit into
mainfrom
swarm/b3c5/task-30
Apr 18, 2026
Merged

fix(llm-callsite): seed latency-optimized callsites on fresh install#26477
siddseethepalli merged 1 commit into
mainfrom
swarm/b3c5/task-30

Conversation

@siddseethepalli
Copy link
Copy Markdown
Contributor

@siddseethepalli siddseethepalli commented Apr 18, 2026

Address Codex + Devin feedback on #26286.

PR #26286 changed LLMSchema.callSites default from LATENCY_OPTIMIZED_CALLSITE_DEFAULTS to {} to restore schema invariants, but that opened a new regression for fresh installs: migration 040 (which seeds latency-optimized callsites) short-circuits when config.json doesn't exist yet, so new users permanently fell through to llm.default (Opus + max effort) for background callsites like notificationDecision, interactionClassifier, guardianQuestionCopy, etc. — the exact cost/latency regression migration 040 was created to prevent.

This extends migration 040 to handle the fresh-install case: when config.json is missing, write a minimal starter config containing just llm.callSites seeds. loadConfig() runs after migrations and backfills the remaining schema defaults via deepMergeMissing, which preserves the seeded callSites while filling in llm.default, profiles, etc. on disk.

Provider-aware: reads llm.default.provider from existing config when present (existing-workspace path unchanged); falls back to anthropic for fresh installs (matches the schema default). This preserves the cross-provider-correctness posture from Codex's separate #26275 concern — the right model is picked per provider via the existing PROVIDER_LATENCY_MODELS table rather than hardcoded Anthropic IDs baked into the schema.

No changes to the schema — LLMSchema.callSites stays .default({}), preserving the invariant work from #26286.


Open in Devin Review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2066ebf40e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

@siddseethepalli
Copy link
Copy Markdown
Contributor Author

Addressed in #26506

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant