Skip to content

v0.3.2 — Mid-session model swaps + 4.7 (1M) label

Choose a tag to compare

@anhyobin anhyobin released this 11 May 14:37
· 24 commits to main since this release

Bug Fixes

Mid-session /model swaps now reflected in the UI

Switching models mid-session with /model (e.g. Opus → Sonnet) left every UI surface stuck on the original model — session row badge, context gauge, warning threshold, and menu-bar dot all kept reporting the first model the session saw.

Root cause: Both JSONL parsers (scanSessionSummary, scanTokensAndThinking) captured the model field only from the first assistant message in a session, guarded by an if model == nil check. Subsequent assistant turns with a different model were ignored.

Fix: The guard is removed. Both parsers now overwrite model on every assistant turn, so mainModel reflects whichever model served the most recent turn — matching the existing last-turn rule used by mainLastTurnUsage. Context-window ratio and warning limit are now evaluated against the model that actually produced the last turn.

(1M) label rule extended to the 4.7 generation

ModelNameFormatter.displayName previously suppressed the (1M) suffix for 4.7 models, on the (incorrect) assumption that 1M was implicit for that generation.

Fix: The 4-7 special-case is removed. Opus/Sonnet/Haiku 4.7 now follow the same ~/.claude/settings.json rule as 4.6 — if an ANTHROPIC_*MODEL env var maps the model with a [1m] suffix, the badge shows "Opus 4.7 (1M)"; otherwise just "Opus 4.7". One rule, no generation-specific exceptions.

Additional

  • Test coverage expanded to assert the (1M) rule across all three 4.7 families (opus/sonnet/haiku), and the ordering-regression guard now tolerates the settings-dependent suffix.

Full Changelog: v0.3.1...v0.3.2