: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
chore(stamphog): move reviewer and digest to claude-sonnet-5-5 (#107984)
Julian Bez81d7eb6b8ee8
diff --git a/products/stamphog/backend/logic/digest.py b/products/stamphog/backend/logic/digest.pyindex 4f95dd8e3866..28657ae3b216 100644--- a/products/stamphog/backend/logic/digest.py+++ b/products/stamphog/backend/logic/digest.py@@ -48,7 +48,7 @@ logger = structlog.get_logger(__name__)# nothing it does not state. A smaller model drops those conditions and invents consequences, and a# reader acts on the line it posts. Both calls run once per audience per weekday, so the price# difference is small.-_DIGEST_MODEL = "claude-sonnet-5"+_DIGEST_MODEL = "claude-sonnet-5-5"_SOURCE_PRODUCT = "stamphog_digest"# The ceiling covers the model's thinking as well as the answer, so it sits far above the size of# the short JSON list itself. It stays under the SDK's limit for a non-streaming request.diff --git a/products/stamphog/backend/tests/test_digest.py b/products/stamphog/backend/tests/test_digest.pyindex 4c49c18757cc..189b015c743e 100644--- a/products/stamphog/backend/tests/test_digest.py+++ b/products/stamphog/backend/tests/test_digest.py@@ -802,7 +802,7 @@ def test_the_digest_call_names_its_product_team_and_source() -> None:distinct_id=f"team-{team_id}",)(selection_call,) = client.calls[:1]- assert selection_call["model"] == "claude-sonnet-5"+ assert selection_call["model"] == "claude-sonnet-5-5"assert selection_call["max_tokens"] > 0assert selection_call["metadata"] == {"user_id": f"team-{team_id}"}assert "extra_headers" not in selection_call and "user" not in selection_calldiff --git a/products/stamphog/backend/tests/test_integration.py b/products/stamphog/backend/tests/test_integration.pyindex 7ae819dd06c2..22597793c834 100644--- a/products/stamphog/backend/tests/test_integration.py+++ b/products/stamphog/backend/tests/test_integration.py@@ -2489,19 +2489,19 @@ def test_mint_pins_allowed_models_when_configured(team, stamphog_chain: Stamphog# A configured model list rides the mint request so a leaked token can call nothing else._repo_config(team.id)event = _register_review(stamphog_chain, 118, "sha118a")- minted = {"token": "phe_run", "allowed_models": ["anthropic/claude-sonnet-5", "anthropic/claude-haiku-4-5"]}+ minted = {"token": "phe_run", "allowed_models": ["anthropic/claude-sonnet-5-5", "anthropic/claude-haiku-4-5"]}mint = MagicMock(return_value=_mint_response(201, minted))with (override_settings(- **_GO_GATEWAY_SETTINGS, STAMPHOG_REVIEWER_TOKEN_ALLOWED_MODELS=["claude-sonnet-5", "claude-haiku-4-5", ""]+ **_GO_GATEWAY_SETTINGS, STAMPHOG_REVIEWER_TOKEN_ALLOWED_MODELS=["claude-sonnet-5-5", "claude-haiku-4-5", ""]),patch.object(activities.requests, "post", mint),):stamphog_chain.post_webhook(event, delivery_id=str(uuid.uuid4()))# Empty entries (a trailing comma in the env value) never reach the gateway, which would 400.- assert mint.call_args_list[0].kwargs["json"]["allowed_models"] == ["claude-sonnet-5", "claude-haiku-4-5"]+ assert mint.call_args_list[0].kwargs["json"]["allowed_models"] == ["claude-sonnet-5-5", "claude-haiku-4-5"]env = stamphog_chain.sandbox_class.created_configs[0].environment_variablesassert env["AI_GATEWAY_API_KEY"] == "phe_run"@@ -2537,7 +2537,7 @@ def test_mint_fails_closed_when_the_gateway_ignores_the_model_pin(team, stamphogerror_before = activities.AI_GATEWAY_TOKEN_MINTS.labels(result="error")._value.get()with (- override_settings(**_GO_GATEWAY_SETTINGS, STAMPHOG_REVIEWER_TOKEN_ALLOWED_MODELS=["claude-sonnet-5"]),+ override_settings(**_GO_GATEWAY_SETTINGS, STAMPHOG_REVIEWER_TOKEN_ALLOWED_MODELS=["claude-sonnet-5-5"]),patch.object(activities.requests, "post", mint),):stamphog_chain.post_webhook(event, delivery_id=str(uuid.uuid4()))diff --git a/products/stamphog/backend/tests/test_logic.py b/products/stamphog/backend/tests/test_logic.pyindex 8937e9b87318..f67c5fe97cdb 100644--- a/products/stamphog/backend/tests/test_logic.py+++ b/products/stamphog/backend/tests/test_logic.py@@ -134,7 +134,7 @@ class RefusalSummaryTests(SimpleTestCase):summary = summarize_refusal(gateway_root="https://ai-gateway.test",token="phe_test",- model="claude-sonnet-5",+ model="claude-sonnet-5-5",gates=[],pr={},files=[],diff --git a/products/stamphog/packages/pr-approval-agent/gateway.py b/products/stamphog/packages/pr-approval-agent/gateway.pyindex 0fa51aae2a67..d88d350334f9 100644--- a/products/stamphog/packages/pr-approval-agent/gateway.py+++ b/products/stamphog/packages/pr-approval-agent/gateway.py@@ -15,7 +15,7 @@ AI_PRODUCT = "aio_stamphog"# Lives here rather than in reviewer.py so the hosted server can read it without claude_agent_sdk:# its fast refusal summary calls the same model through the same gateway.-REVIEWER_MODEL = "claude-sonnet-5"+REVIEWER_MODEL = "claude-sonnet-5-5"def analytics_extra_properties() -> dict[str, object]:diff --git a/products/stamphog/packages/pr-approval-agent/version.py b/products/stamphog/packages/pr-approval-agent/version.pyindex 4237d8760024..80eceb095b18 100644--- a/products/stamphog/packages/pr-approval-agent/version.py+++ b/products/stamphog/packages/pr-approval-agent/version.py@@ -9,4 +9,4 @@ changes don't need a bump - they are tracked by the policy sha shown next tothe version in the verdict table."""-STAMPHOG_VERSION = "2.2.0"+STAMPHOG_VERSION = "2.3.0"