Skip to content

Settings: Default Model dropdown ships stale hardcoded model IDs and lacks 1M context toggle #212

Description

@prefrontalsys

Bug

The "Default Model" dropdown in Settings → Models ships hardcoded full model IDs that go stale. As of v3.8.4 the options are:

  • claude-sonnet-4-5-20250929 ("Claude Sonnet 4.5")
  • claude-opus-4-6 ("Claude Opus 4.6")
  • claude-haiku-4-5-20251001 ("Claude Haiku 4.5")

Anthropic has since released Opus 4.7, Sonnet 4.6/4.7, and Haiku 4.6, so the dropdown is silently out of date. The list also has no way to enable Claude Code's documented 1M token context window, and no escape hatch for users on Bedrock/Vertex/Foundry who need to type a custom model ARN/deployment ID.

Source: src/lib/types/claudeSettings.ts:121-137, consumed by src/lib/components/claude-settings/ModelConfigEditor.svelte:81.

Why this is structurally fragile

Claude Code's model configuration docs explicitly recommend model aliases (opus, sonnet, haiku) over hardcoded IDs precisely because aliases auto-resolve to the latest version on the provider side:

Aliases point to the recommended version for your provider and update over time.

By hardcoding full IDs, the tool-manager forces a release every time Anthropic ships a new model. Aliases push that responsibility back to Anthropic where it belongs.

There is also no authoritative client-side way to list available models — the Anthropic SDK exposes client.models.list() but it requires ANTHROPIC_API_KEY, which subscription users may not have set. So a "refresh from API" approach is best-effort, not authoritative.

Missing capability: 1M context window

Claude Code supports a 1M token context window for Opus and Sonnet via the documented [1m] suffix on the model ID (e.g. opus[1m], sonnet[1m]). See extended context docs. The tool-manager has no UI for this — users must hand-edit settings.json.

Proposed fix

  1. Replace CLAUDE_MODELS with the documented aliases (opus, sonnet, haiku, opusplan, best) plus a supports1m: boolean flag per entry.
  2. Add an "Other (custom model ID)…" option that reveals a free-text input. Accepts any string — full model name, Bedrock ARN, Vertex version name, Foundry deployment name.
  3. Add a "Use 1M token context window" checkbox below the dropdown. When checked, appends [1m] to the saved value. Auto-disables when a non-1M model (e.g. Haiku) is selected.
  4. Link to the official Claude Code model-config docs from the helper text so users can verify.

Acceptance criteria

  • Dropdown no longer shows version-specific labels like "Claude Sonnet 4.5"
  • User can save any custom model ID via the "Other" option
  • 1M context toggle correctly appends/strips [1m] and round-trips through settings.model
  • Existing tests still pass; new tests cover the 1M toggle and custom-ID path

PR to follow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions