mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-30 03:00:41 -04:00
refactor(backend/copilot): tighten anthropic prefix match + trim fast_advanced_model comment
- _is_reasoning_route: match both ``anthropic/`` and ``anthropic.`` explicitly so ``anthropic-mock`` and other off-prefix names no longer slip through. - config.fast_advanced_model: trim verbose K2-Thinking comparison rationale from the field description — the PR description is the right place for that.
This commit is contained in:
@@ -183,7 +183,7 @@ def _is_reasoning_route(model: str) -> bool:
|
||||
existing deployments.
|
||||
"""
|
||||
lowered = model.lower()
|
||||
if lowered.startswith("anthropic"):
|
||||
if lowered.startswith(("anthropic/", "anthropic.")):
|
||||
return True
|
||||
if lowered.startswith("moonshotai/"):
|
||||
return True
|
||||
|
||||
@@ -60,21 +60,9 @@ class ChatConfig(BaseSettings):
|
||||
)
|
||||
fast_advanced_model: str = Field(
|
||||
default="anthropic/claude-opus-4.7",
|
||||
validation_alias=AliasChoices(
|
||||
"CHAT_FAST_ADVANCED_MODEL",
|
||||
),
|
||||
description="Baseline path, 'advanced' tier. Opus by default so "
|
||||
"the advanced tier is a clean A/B vs the SDK advanced tier: same "
|
||||
"model, different path — isolates the reasoning-wire + cache "
|
||||
"differences from model capability differences. Kimi K2-Thinking "
|
||||
"(the reasoning-native sibling) benchmarks ~9pp behind K2.6 on "
|
||||
"SWE-Bench Verified and ~23pp behind on BrowseComp, is text-only, "
|
||||
"and was published 6 months before K2.6 — not a fit for the "
|
||||
"advanced tier today. Override via ``CHAT_FAST_ADVANCED_MODEL``. "
|
||||
"Unlike the other three cells there is no legacy env var to "
|
||||
"alias — this cell was created in the 2×2 split — but the "
|
||||
"``validation_alias`` stays explicit so the override isn't "
|
||||
"coupled to ``env_prefix`` continuing to exist.",
|
||||
validation_alias=AliasChoices("CHAT_FAST_ADVANCED_MODEL"),
|
||||
description="Baseline path, 'advanced' tier. Opus by default. "
|
||||
"Override via ``CHAT_FAST_ADVANCED_MODEL``.",
|
||||
)
|
||||
thinking_standard_model: str = Field(
|
||||
default="anthropic/claude-sonnet-4-6",
|
||||
|
||||
Reference in New Issue
Block a user