Automate browser based workflows with AI
Python aiapiautomationbrowserbrowser-automationcomputergptllmplaywrightpowerautomatepuppeteerpythonrpaseleniumvisionworkflow
fix: reorder Claude Fable fallback router (#6552)
Andrew Neilson6bf56f20eee4
diff --git a/skyvern/forge/sdk/api/llm/api_handler_factory.py b/skyvern/forge/sdk/api/llm/api_handler_factory.pyindex 55dfdbabc..68a4a9010 100644--- a/skyvern/forge/sdk/api/llm/api_handler_factory.py+++ b/skyvern/forge/sdk/api/llm/api_handler_factory.py@@ -646,6 +646,8 @@ class LLMAPIHandlerFactory:"anthropic/claude-opus-4-7","anthropic/claude-opus-4-8","anthropic/claude-fable-5",+ "anthropic-claude-opus-4-8",+ "anthropic-claude-fable-5",}@staticmethod@@ -654,8 +656,9 @@ class LLMAPIHandlerFactory:) -> None:"""Apply thinking optimization for Anthropic/Claude models."""model_label = LLMAPIHandlerFactory._get_model_label(llm_config)+ check_model = LLMAPIHandlerFactory._get_check_model(llm_config, model_label)- if LLMAPIHandlerFactory.requires_adaptive_thinking(model_label):+ if LLMAPIHandlerFactory.requires_adaptive_thinking(check_model):parameters["thinking"] = {"type": "adaptive"}parameters.setdefault("output_config", {})["effort"] = LLMAPIHandlerFactory.ADAPTIVE_THINKING_EFFORTLOG.debug(@@ -783,7 +786,8 @@ class LLMAPIHandlerFactory:check_model = model_labelif isinstance(llm_config, LLMRouterConfig) and getattr(llm_config, "model_list", None):try:- check_model = llm_config.model_list[0].model_name or model_label # type: ignore[attr-defined]+ primary_model = llm_config.model_list[0] # type: ignore[attr-defined]+ check_model = primary_model.litellm_params.get("model") or primary_model.model_name or model_labelexcept Exception:check_model = model_labelreturn check_modeldiff --git a/tests/unit/test_api_handler_factory.py b/tests/unit/test_api_handler_factory.pyindex 34c9a535c..d3ea60ee8 100644--- a/tests/unit/test_api_handler_factory.py+++ b/tests/unit/test_api_handler_factory.py@@ -246,6 +246,8 @@ def test_normalize_llm_model_strips_provider_prefix() -> None:"anthropic/claude-opus-4-7","anthropic/claude-opus-4-8","anthropic/claude-fable-5",+ "anthropic-claude-opus-4-8",+ "anthropic-claude-fable-5",],)def test_requires_adaptive_thinking_for_direct_anthropic_models(model_name: str) -> None: