feat(llma): add claude-opus-4-8 to ai gateway#60507
Merged
Merged
Conversation
Adds claude-opus-4-8 to the llm-gateway Bedrock mapping and product allowlists (posthog_code, background_agents), and to the AI observability supported models list. Updates default model references from opus-4-7 to opus-4-8 for the sandbox eval agent, custom prompt docstring, and personal-spend test fixtures. Generated-By: PostHog Code Task-Id: fd62d74b-93f9-4c96-a794-27388b6c2b34
Contributor
|
🎭 Playwright report · View test results →
These issues are not necessarily caused by your changes. |
Contributor
|
Reviews (1): Last reviewed commit: "feat(llma): add claude-opus-4-8 to ai ga..." | Re-trigger Greptile |
joshsny
approved these changes
May 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Anthropic released claude-opus-4-8. The llm-gateway needs to allow the new
model id (with the corresponding Bedrock inference profile mapping), and
the places that previously defaulted to opus-4-7 should point at the
newer flagship.
Changes
services/llm-gateway/src/llm_gateway/bedrock.py— add the US/EUclaude-opus-4-8Bedrock inference-profile mapping.services/llm-gateway/src/llm_gateway/products/config.py— allowclaude-opus-4-8forposthog_code(shared withslack_app) andbackground_agents.services/llm-gateway/tests/test_bedrock.py,services/llm-gateway/tests/test_product_config.py— extend theparametrized cases to cover opus-4-8.
products/ai_observability/backend/llm/providers/anthropic.py—list opus-4-8 first in
SUPPORTED_MODELS,SUPPORTED_MODELS_WITH_CACHE_CONTROL, andSUPPORTED_MODELS_WITH_THINKING.products/tasks/backend/temporal/process_task/utils.py— addreasoning-effort tuple for opus-4-8 (same shape as opus-4-7).
ee/hogai/eval/conftest.py— default--agent-modelis nowanthropic/claude-opus-4-8.products/tasks/backend/services/custom_prompt_internals.py—docstring example uses opus-4-8.
products/ai_observability/backend/api/test/test_personal_spend.py—test fixture default model bumped to opus-4-8.
How did you test this code?
Agent-authored. No manual testing performed. The change is mechanical:
adding a model id to allowlists/mappings and swapping a few default
values. Existing parametrized tests in
test_bedrock.pyandtest_product_config.pywere extended to exercise the new id; CI willrun them.
Automatic notifications
Docs update
🤖 Agent context
Authored by PostHog Code. The task was to add opus-4-8 to the ai
gateway and swap defaults from opus-4-7. Opus-4-7 entries were kept
alongside the new id (not replaced) because 4.7 is still a supported
model — the change only adds 4.8 to allowlists and promotes it to the
default where opus-4-7 was previously the default. The auto-generated
nodejs/src/ingestion/ai/costs/providers/llm-costs.jsonwas left tothe scheduled cost-update workflow; the opus-4-7 references in
ee/hogai/test/eval/test_acp_log_model.pyare log-parsing fixtures(not defaults) and were left as-is.
Created with PostHog Code