feat(settings): use model aliases + 1M context toggle + custom ID#213
Merged
tylergraydev merged 1 commit intoMay 4, 2026
Merged
Conversation
The Default Model dropdown shipped hardcoded full IDs (claude-sonnet-4-5-*, claude-opus-4-6, claude-haiku-4-5-*) that go stale every Anthropic release. Switch to documented model aliases (opus, sonnet, haiku, opusplan, best) which auto-resolve to the latest version on the provider side, plus add the missing 1M-context toggle and a custom-ID escape hatch. Changes: - CLAUDE_MODELS now lists aliases with a supports1m flag per entry - ModelConfigEditor: add "Other (custom)" option with free-text input - ModelConfigEditor: add "Use 1M token context window" checkbox that appends/strips the documented [1m] suffix; auto-disables for Haiku - Tests updated to verify the alias contract and 1M-capability flags - Inline doc links to code.claude.com/docs/en/model-config Refs: tylergraydev#212
tylergraydev
pushed a commit
that referenced
this pull request
May 4, 2026
User-facing additions: - Model picker now uses Claude Code aliases (opus/sonnet/haiku/opusplan/best) with a 1M context toggle and a free-form "Other (custom model ID)" field for Bedrock ARNs / Vertex / Foundry IDs (#213). - Rules dropped into ~/.claude/rules/ or {project}/.claude/rules/ now show up in the UI via new global/project scanners (#200). Fixes: - Sync Config no longer wipes externally-managed configs (.mcp.json, claude.json, OpenCode/Copilot/Cursor/Gemini/Codex) — extends the #191 guard to all 7 writers and imports .mcp.json on project add (#204). - Skill/command/sub-agent writers emit `tags` as JSON arrays so they round-trip through the DB reader (#202). - PR builds from forks/Dependabot no longer fail on missing TAURI_SIGNING_PRIVATE_KEY (#203). - delete_rule_inner returns real DB errors instead of swallowing them as "row absent" (follow-up to #200). Internal: - Cargo clippy from 134 warnings to 0; CI now enforces -D warnings on --lib --tests (#205). All 1565 frontend tests and 2021 Rust tests pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #212.
Summary
The Default Model dropdown in Settings → Models shipped hardcoded full model IDs (
claude-sonnet-4-5-20250929,claude-opus-4-6,claude-haiku-4-5-20251001) that go stale every time Anthropic ships a new model. This PR switches to model aliases — Claude Code's documented mechanism for forward-compatibility — and adds the missing 1M context window toggle plus a custom model ID escape hatch.Why aliases
Per the Claude Code model-config docs:
Aliases (
opus,sonnet,haiku,opusplan,best) auto-resolve on the provider side, so the tool-manager no longer needs a release every time a new model lands. There's no authoritative client-side way to list available models without anANTHROPIC_API_KEY(subscription users may not have one), so aliases are the most robust choice.Changes
src/lib/types/claudeSettings.tsCLAUDE_MODELSnow lists aliases (opus,sonnet,haiku,opusplan,best) with asupports1m: booleanflag.src/lib/components/claude-settings/ModelConfigEditor.svelte[1m]suffix to the saved model ID. Auto-disables when a non-1M model (Haiku) is selected. Round-trips correctly throughsettings.model.src/tests/components/claude-settings.test.tssupports1mflag per model.Test plan
npm test -- --run— all 1565 tests passnpm test -- --run src/tests/components/claude-settings.test.ts src/tests/components/model-overrides.test.ts— 24/24 passnpm run check— no new errors introduced (75 pre-existing errors in unrelated files likeContainerTerminal.svelte,keybindingsLibrary.test.ts, none touched by this PR)opus, check 1M box → saved asopus[1m]arn:aws:bedrock:…→ saves verbatimsettings.model: "claude-opus-4-7[1m]"→ custom field showsclaude-opus-4-7, 1M box checkedNotes
AVAILABLE_MODEL_SHORTCUTS(the "Available Models" multi-select) is unchanged — it already used aliases.SubAgentForm.sveltemodel picker is unchanged — it already used aliases.model-overrides.test.tsis unchanged — its fixtures use full IDs as map keys to test the override mechanism, which is still correct semantically.