Repository navigation
fix(web): default new LLM agents to claude-sonnet-4-6 - #822
Conversation
The create-agent dialog started on claude-sonnet-4-5-20250929, which Anthropic retires on 2026-11-30, while every agent preset already defaults to claude-sonnet-4-6. The dialog's initial and reset model now match the presets.
There was a problem hiding this comment.
ℹ️ Two minor suggestions inline — the behavioral change itself is correct and complete.
Approach: sound — the dialog's default now matches every preset, and the change covers both places the dialog sets it.
Reviewed changes
- Default model —
create-agent-dialog.tsxinitialises and resetsmodelSelecttoclaude-sonnet-4-6; I confirmed the id is inllm_models.json, so the model<Select>renders it as a real option rather than an unknown value. - Regression test — the new
CreateAgentDialog — default LLM modelcase creates a global LLM agent with untouched fields and assertsllm_model: "claude-sonnet-4-6". - Premise — Anthropic's deprecation table does list
claude-sonnet-4-5-20250929as retiring 2026-11-30 (the undated alias included), whileclaude-sonnet-4-6is Active.
deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏
The presets, the dialog's initial and reset model, and the test each repeated the model id, so they could drift apart again unnoticed. DEFAULT_LLM_MODEL in agent-api.ts is now the only copy. The test fills the base URL and API key through their labels.
|
Both suggestions are in f080b90:
|
There was a problem hiding this comment.
✅ No new issues found.
Approach: sound — the follow-up commit turns the model id into one exported constant, so the dialog, presets, and test can no longer drift apart.
Reviewed changes (delta since the prior review at 354d82a)
- Shared constant —
DEFAULT_LLM_MODELis exported fromagent-api.tsand all fiveAGENT_PRESETSnow reference it. - Dialog defaults — the initial
modelSelectstate andreset()both read the constant, removing the two duplicated literals. - Test cleanup — the regression test imports the constant, drives the Base URL and API Key inputs through
screen.getByLabelText, and keeps an explicit check that the constant is not the retiredclaude-sonnet-4-5-20250929.
grep confirms no production default for the LLM field still hardcodes the old id; the remaining claude-sonnet-4-5 strings are the ACP modelPlaceholder locale entries and the test's own regression assertion. Both prior inline threads are addressed.
deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏
pikann
left a comment
There was a problem hiding this comment.
LGTM! Thank you for the contribution! 🚀

Summary
The create-agent dialog (
apps/web/src/components/projects/agents/create-agent-dialog.tsx) starts a new LLM agent onclaude-sonnet-4-5-20250929, both in its initial state and when the form resets. Anthropic retires that model on 2026-11-30 (model deprecations), and the retirement covers the undatedclaude-sonnet-4-5alias too. After that, an agent created with the untouched default fails on every run. Every preset inapps/web/src/lib/agent-api.tsalready usesdefaultLLMModel: "claude-sonnet-4-6", so the dialog's two defaults now match the presets.Not changed: the
llm_models.jsoncatalog inservices/agent-runner(a list to pick from) and thee.g. claude-sonnet-4-5placeholder strings in the locale files.Type of Change
Checklist
Tests
create-agent-dialog.test.tsx("default LLM model") creates a global LLM agent without touching the model, and checks thatcreateGlobalAgentreceivesllm_model: "claude-sonnet-4-6". It fails onmaster("llm_model": "claude-sonnet-4-5-20250929") and passes with this change.vitest run src/components/projects/agents/: 13 files, 180 passed.tsc -b --noEmitandbiome checkon the changed files are clean.Cannot read properties of undefined (reading 'getItem')), because Node's ownlocalStorageglobal shadows jsdom's. That's unrelated to this change.