:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(llm-gateway): disable claude-fable-5 (#63382)
Charles Vien7c2ac112058f
diff --git a/services/llm-gateway/src/llm_gateway/bedrock.py b/services/llm-gateway/src/llm_gateway/bedrock.pyindex d14ead0e1cad..4e47f368ba33 100644--- a/services/llm-gateway/src/llm_gateway/bedrock.py+++ b/services/llm-gateway/src/llm_gateway/bedrock.py@@ -48,10 +48,6 @@ ANTHROPIC_TO_BEDROCK_MODEL_MAP: Final[dict[str, dict[str, str]]] = {"us": "us.anthropic.claude-opus-4-8","eu": "eu.anthropic.claude-opus-4-8",},- "claude-fable-5": {- "us": "us.anthropic.claude-fable-5",- "eu": "eu.anthropic.claude-fable-5",- },"claude-sonnet-4-5": {"us": "us.anthropic.claude-sonnet-4-5-20250929-v1:0","eu": "eu.anthropic.claude-sonnet-4-5-20250929-v1:0",diff --git a/services/llm-gateway/src/llm_gateway/products/config.py b/services/llm-gateway/src/llm_gateway/products/config.pyindex 526fd714623a..a6a8cef80249 100644--- a/services/llm-gateway/src/llm_gateway/products/config.py+++ b/services/llm-gateway/src/llm_gateway/products/config.py@@ -42,7 +42,6 @@ _POSTHOG_CODE_AGENT_MODELS: Final[frozenset[str]] = frozenset("claude-opus-4-6","claude-opus-4-7","claude-opus-4-8",- "claude-fable-5","claude-sonnet-4-5","claude-sonnet-4-6","claude-haiku-4-5",@@ -73,7 +72,6 @@ PRODUCTS: Final[dict[str, ProductConfig]] = {"claude-opus-4-6","claude-opus-4-7","claude-opus-4-8",- "claude-fable-5","claude-sonnet-4-5","claude-haiku-4-5","gpt-5.4",diff --git a/services/llm-gateway/tests/test_bedrock.py b/services/llm-gateway/tests/test_bedrock.pyindex 934f517e6e24..af94267bf95f 100644--- a/services/llm-gateway/tests/test_bedrock.py+++ b/services/llm-gateway/tests/test_bedrock.py@@ -117,7 +117,6 @@ class TestBedrockSpecific:pytest.param("claude-sonnet-4-6", "bedrock/us.anthropic.claude-sonnet-4-6", id="anthropic_name_mapped"),pytest.param("claude-opus-4-7", "bedrock/us.anthropic.claude-opus-4-7", id="opus_4_7_inference_profile"),pytest.param("claude-opus-4-8", "bedrock/us.anthropic.claude-opus-4-8", id="opus_4_8_inference_profile"),- pytest.param("claude-fable-5", "bedrock/us.anthropic.claude-fable-5", id="fable_5_inference_profile"),pytest.param("us.anthropic.claude-sonnet-4-6", "bedrock/us.anthropic.claude-sonnet-4-6", id="already_bedrock_id"),diff --git a/services/llm-gateway/tests/test_model_cost_overrides.py b/services/llm-gateway/tests/test_model_cost_overrides.pyindex ad1eeeb92ea1..403cb49c241a 100644--- a/services/llm-gateway/tests/test_model_cost_overrides.py+++ b/services/llm-gateway/tests/test_model_cost_overrides.py@@ -95,7 +95,9 @@ class TestOverrideSurfacesThroughRefresh:assert "claude-fable-5" in service.get_all_models()@patch("llm_gateway.rate_limiting.model_cost_service.get_model_cost_map")- def test_fable_5_listed_for_posthog_code(self, mock_get_cost_map: MagicMock) -> None:+ def test_fable_5_not_listed_for_posthog_code(self, mock_get_cost_map: MagicMock) -> None:+ # The cost-override bridge keeps the model resolvable, but it is removed+ # from the posthog_code allowlist so /v1/models must not list it.mock_get_cost_map.return_value = {"claude-opus-4-8": {"litellm_provider": "anthropic",@@ -120,4 +122,5 @@ class TestOverrideSurfacesThroughRefresh:):model_ids = {m.id for m in get_available_models("posthog_code")}- assert "claude-fable-5" in model_ids+ assert "claude-opus-4-8" in model_ids+ assert "claude-fable-5" not in model_idsdiff --git a/services/llm-gateway/tests/test_product_config.py b/services/llm-gateway/tests/test_product_config.pyindex b72ef325ecbe..46cd2fcbdb0c 100644--- a/services/llm-gateway/tests/test_product_config.py+++ b/services/llm-gateway/tests/test_product_config.py@@ -92,7 +92,6 @@ class TestCheckProductAccess:"claude-opus-4-6","claude-opus-4-7","claude-opus-4-8",- "claude-fable-5","claude-sonnet-4-5","claude-sonnet-4-6","claude-haiku-4-5",@@ -114,6 +113,7 @@ class TestCheckProductAccess:"gpt-4o-mini","claude-3-5-haiku-20241022","claude-3-opus",+ "claude-fable-5","o1",],)@@ -130,7 +130,6 @@ class TestCheckProductAccess:"claude-opus-4-6","claude-opus-4-7","claude-opus-4-8",- "claude-fable-5","claude-sonnet-4-5","claude-sonnet-4-6","claude-haiku-4-5",@@ -198,6 +197,23 @@ class TestCheckProductAccess:assert allowed is Trueassert error is None+ @patch(+ "llm_gateway.products.config.get_settings", return_value=MagicMock(debug=False, bedrock_region_name="us-east-1")+ )+ def test_posthog_code_rejects_claude_fable_5_via_bedrock_provider(self, mock_get_settings: MagicMock):+ # Fable 5 has no Bedrock mapping, so the bedrock provider path must not+ # resurrect it via the BEDROCK_MODELS entries in the allowlist union.+ allowed, error = check_product_access(+ "posthog_code",+ "oauth_access_token",+ POSTHOG_CODE_US_APP_ID,+ "claude-fable-5",+ provider="bedrock",+ )+ assert allowed is False+ assert error is not None+ assert "not allowed" in error+@pytest.mark.parametrize("model",[@@ -205,7 +221,6 @@ class TestCheckProductAccess:"claude-opus-4-6","claude-opus-4-7","claude-opus-4-8",- "claude-fable-5","claude-sonnet-4-5","claude-haiku-4-5","gpt-5.3-codex",