Launch 1M-default Claude models without the [1m] suffix - #450
Merged
Merged
Conversation
Claude Code echoes the launch id (`claude-opus-5[1m]`) in its `init` message while the API reports the bare id, so every Opus 5 / Fable 5 session opened with a spurious "model changed" divider. - Only append the manifest's context suffix when the selected window exceeds the model's default; 1M-default slugs launch bare. Smaller selections keep compacting early via `autoCompactWindow`. - Resolve manifest aliases (`opus`, `claude-opus-5.0`) to the canonical slug before launch, matching upstream t3code. - Treat a `[1m]` launch id and its bare form as the same served model when deciding whether to draw the divider. Only the fixed `[1m]` suffix is ignored.
Claude Code strips model suffixes with /\[1m\]$/i and its canonical-name normalizer already accepts [2m], so the served-model comparison now ignores that explicit, case-insensitive list. Arbitrary [...] suffixes are still treated as a real model change.
Tryanks
enabled auto-merge (squash)
September 16, 2026 10:54
The replica readiness check only proves the client received the SessionEvents baseline. The host's resident timeline is hydrated by a separate detached load, which on Windows CI can still be empty when the live events are recorded, so the live snapshot lacked turn-1.
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.
Summary
Since #439 sourced the Claude catalog from the t3code manifest, Opus 5 / Fable 5 sessions launched as
claude-opus-5[1m]. Claude Code echoes that id insystem/init, but the API reports the bareclaude-opus-5on the first assistant message, so every session opened with a spurious "模型已切换: claude-opus-5[1m] → claude-opus-5" divider.Upstream t3code appends
[1m]unconditionally whenever thecontextWindowoption resolves to1m(including 1M-default models) and strips the bracket suffix again on the usage side. We diverge deliberately on the launch id and sync the rest.Changes
context_window_suffixreturns nothing when the selected window does not exceed the model's default, so 1M-default slugs (Opus 5, Fable 5) launch bare. Sonnet 5 / 4.6 (200k default) still get[1m]when 1M is selected. Smaller selections keep compacting early viaautoCompactWindow.aliases(opus,claude-opus-5.0, …) now parse and resolve case-insensitively to the canonical slug, which is what gets launched. Previously an alias typed as a custom model got no capabilities, effort map, or suffix.[1m]and[2m], matched case-insensitively: Claude Code 2.1.273 compares ids with/\[1m\]$/iand its canonical-name normalizer already accepts/\[[12]m\]$/. No other bracket suffix exists in the CLI today, and unlisted ones ([3m]) still count as a real change. No[*]wildcard.Effort mapping (
effortMap,ultracode → xhigh+settings.ultracode,ultrathinkas prompt prefix) and the--settingsassembly were compared against upstreamClaudeAdapter.tsand already match; the bundled manifest is identical to upstream's currentmodel-manifest.json.Test plan
cargo test -p agent(186 passed) —context_window_launch_semanticsupdated for bare 1M-default launches and alias launches; manifest tests cover alias lookup;strip_context_window_suffix_is_an_explicit_list.cargo test -p tcode-core(129 passed) — newserved_model_without_1m_suffix_is_not_a_model_change.cargo clippy -p agent -p tcode-core --testsclean,cargo fmt --checkclean.