: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
feat(llm-gateway): re-enable claude-fable-5 (#67267)
Charles Viencb6cfcd87dd9
diff --git a/services/llm-gateway/src/llm_gateway/bedrock.py b/services/llm-gateway/src/llm_gateway/bedrock.pyindex abf7a596577e..4dbf0d7ec98d 100644--- a/services/llm-gateway/src/llm_gateway/bedrock.py+++ b/services/llm-gateway/src/llm_gateway/bedrock.py@@ -66,6 +66,10 @@ 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 82f47051aa2f..38a4a8ce86d2 100644--- a/services/llm-gateway/src/llm_gateway/products/config.py+++ b/services/llm-gateway/src/llm_gateway/products/config.py@@ -45,6 +45,7 @@ _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-sonnet-5",@@ -77,6 +78,7 @@ 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-sonnet-5","claude-haiku-4-5",diff --git a/services/llm-gateway/tests/test_bedrock.py b/services/llm-gateway/tests/test_bedrock.pyindex ec1299e2864d..f89e372d0ffe 100644--- a/services/llm-gateway/tests/test_bedrock.py+++ b/services/llm-gateway/tests/test_bedrock.py@@ -121,6 +121,7 @@ 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("claude-sonnet-5", "bedrock/us.anthropic.claude-sonnet-5", id="sonnet_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 403cb49c241a..170bc624bebf 100644--- a/services/llm-gateway/tests/test_model_cost_overrides.py+++ b/services/llm-gateway/tests/test_model_cost_overrides.py@@ -95,9 +95,7 @@ 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_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.+ def test_fable_5_listed_for_posthog_code(self, mock_get_cost_map: MagicMock) -> None:mock_get_cost_map.return_value = {"claude-opus-4-8": {"litellm_provider": "anthropic",@@ -123,4 +121,4 @@ class TestOverrideSurfacesThroughRefresh:model_ids = {m.id for m in get_available_models("posthog_code")}assert "claude-opus-4-8" in model_ids- assert "claude-fable-5" not in model_ids+ assert "claude-fable-5" in model_idsdiff --git a/services/llm-gateway/tests/test_product_config.py b/services/llm-gateway/tests/test_product_config.pyindex 0fdb82f1033d..8a36d6d42d38 100644--- a/services/llm-gateway/tests/test_product_config.py+++ b/services/llm-gateway/tests/test_product_config.py@@ -102,6 +102,7 @@ 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-sonnet-5",@@ -124,7 +125,6 @@ class TestCheckProductAccess:"gpt-4o-mini","claude-3-5-haiku-20241022","claude-3-opus",- "claude-fable-5","o1",],)@@ -141,6 +141,7 @@ 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-sonnet-5",@@ -209,23 +210,6 @@ 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",[@@ -233,6 +217,7 @@ class TestCheckProductAccess:"claude-opus-4-6","claude-opus-4-7","claude-opus-4-8",+ "claude-fable-5","claude-sonnet-4-5","claude-sonnet-5","claude-haiku-4-5",