Remove obsolete [1m] model variants
Since March 2026 the 1M-token context window is the default for Opus 4.6/4.7 and Sonnet 4.6 – no separate variant or beta header needed. The "[1m]" suffix on model IDs is dead code now and would even produce HTTP 400 against the current API. Cleanup: - Drop 3 [1m] options from the agent model dropdown; default selection moves from opus-4-7[1m] to opus-4-7. - Drop 5 [1m] mappings from ResolveModelId and add a defensive Replace as a safety net for any agent record still holding an old value. - One-shot startup migration on agents.model + chains.model strips the suffix so existing chains can be re-chatted without errors. - ARCHITECTURE.md reflects the slimmed list and explains why 1M is now default. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
271902f32d
commit
112fd70f3b
4 files changed
+17
-16
No files matched your search
@@ -34,20 +34,20 @@ public class ChatService
|
||||
// OpenAI-kompatible Provider werden unverändert durchgereicht (Format: "provider:model")
|
||||
if (OpenAiService.IsOpenAiProvider(model)) return model;
|
||||
|
||||
// Defensiv-Strip: alte "[1m]"-Suffixe aus DB transparent normalisieren.
|
||||
// 1M-Context ist seit März 2026 Default bei Opus 4.6/4.7/4.8 + Sonnet 4.6 – kein Suffix mehr nötig.
|
||||
if (!string.IsNullOrEmpty(model) && model.Contains("[1m]"))
|
||||
model = model.Replace("[1m]", "");
|
||||
|
||||
return model switch
|
||||
{
|
||||
"sonnet" => "claude-sonnet-4-6",
|
||||
"sonnet[1m]" => "claude-sonnet-4-6[1m]",
|
||||
"sonnet-4-5" => "claude-sonnet-4-5",
|
||||
"sonnet-4-6" => "claude-sonnet-4-6",
|
||||
"sonnet-4-6[1m]" => "claude-sonnet-4-6[1m]",
|
||||
"opus" => "claude-opus-4-7",
|
||||
"opus[1m]" => "claude-opus-4-7[1m]",
|
||||
"opus-4-5" => "claude-opus-4-5",
|
||||
"opus-4-6" => "claude-opus-4-6",
|
||||
"opus-4-6[1m]" => "claude-opus-4-6[1m]",
|
||||
"opus-4-7" => "claude-opus-4-7",
|
||||
"opus-4-7[1m]" => "claude-opus-4-7[1m]",
|
||||
"haiku" => "claude-haiku-4-5",
|
||||
"haiku-4-5" => "claude-haiku-4-5",
|
||||
_ => "claude-sonnet-4-6"
|
||||
|
||||
Reference in new issue
Block a user