feat(models): add support for 'claude-fable-5' mode
This commit is contained in:
@@ -82,6 +82,7 @@ _MODEL_ENTRIES: list[tuple[str, str, str]] = [
|
||||
("gpt-5.3-codex", "gpt-5.3-codex", "custom-openai"),
|
||||
("gpt-5-mini", "gpt-5-mini", "custom-openai"),
|
||||
# Anthropic (current generation)
|
||||
("claude-fable-5", "claude-fable-5", "anthropic"),
|
||||
("claude-opus-4-8", "claude-opus-4-8", "anthropic"),
|
||||
("claude-sonnet-4-6", "claude-sonnet-4-6", "anthropic"),
|
||||
("claude-haiku-4-5", "claude-haiku-4-5", "anthropic"),
|
||||
@@ -135,6 +136,7 @@ _MODEL_ENTRIES: list[tuple[str, str, str]] = [
|
||||
("kimi-k2.5", "Pro/moonshotai/Kimi-K2.5", "siliconflow"),
|
||||
("glm-4.7", "Pro/zai-org/GLM-4.7", "siliconflow"),
|
||||
# OpenRouter
|
||||
("claude-fable-5", "anthropic/claude-fable-5", "openrouter"),
|
||||
("claude-opus-4.8", "anthropic/claude-opus-4.8", "openrouter"),
|
||||
("claude-opus-4.8-fast", "anthropic/claude-opus-4.8-fast", "openrouter"),
|
||||
("claude-sonnet-4.6", "anthropic/claude-sonnet-4.6", "openrouter"),
|
||||
@@ -312,8 +314,8 @@ def _apply_auto_config(
|
||||
_is_proxy = False
|
||||
if _is_proxy or (is_third_party and not _supports_thinking):
|
||||
pass
|
||||
elif model_id.endswith(("4-6", "4-7", "4-8")):
|
||||
kwargs["thinking"] = {"type": "adaptive"}
|
||||
elif "fable" in model_id or model_id.endswith(("4-6", "4-7", "4-8")):
|
||||
kwargs["thinking"] = {"type": "adaptive", "display": "summarized"}
|
||||
kwargs.setdefault("effort", "max")
|
||||
else:
|
||||
kwargs["thinking"] = {"type": "enabled", "budget_tokens": 10000}
|
||||
|
||||
+3
-3
@@ -2263,7 +2263,7 @@ class TestAutoConfig:
|
||||
get_chat_model("claude-sonnet-4-6")
|
||||
|
||||
call_kwargs = mock_init.call_args[1]
|
||||
assert call_kwargs["thinking"] == {"type": "adaptive"}
|
||||
assert call_kwargs["thinking"] == {"type": "adaptive", "display": "summarized"}
|
||||
assert call_kwargs["effort"] == "max"
|
||||
|
||||
@patch("EvoScientist.llm.models.init_chat_model")
|
||||
@@ -2275,7 +2275,7 @@ class TestAutoConfig:
|
||||
get_chat_model("claude-opus-4-8")
|
||||
|
||||
call_kwargs = mock_init.call_args[1]
|
||||
assert call_kwargs["thinking"] == {"type": "adaptive"}
|
||||
assert call_kwargs["thinking"] == {"type": "adaptive", "display": "summarized"}
|
||||
assert call_kwargs["effort"] == "max"
|
||||
|
||||
@patch("EvoScientist.llm.models.init_chat_model")
|
||||
@@ -2313,7 +2313,7 @@ class TestAutoConfig:
|
||||
get_chat_model("claude-sonnet-4-6")
|
||||
|
||||
call_kwargs = mock_init.call_args[1]
|
||||
assert call_kwargs["thinking"] == {"type": "adaptive"}
|
||||
assert call_kwargs["thinking"] == {"type": "adaptive", "display": "summarized"}
|
||||
assert call_kwargs["effort"] == "max"
|
||||
|
||||
@patch("EvoScientist.llm.models.init_chat_model")
|
||||
|
||||
Reference in New Issue
Block a user