Skip to content

feat(llma): add claude-opus-4-8 to ai gateway#60507

Merged
skoob13 merged 1 commit into
masterfrom
posthog-code/add-claude-opus-4-8
May 28, 2026
Merged

feat(llma): add claude-opus-4-8 to ai gateway#60507
skoob13 merged 1 commit into
masterfrom
posthog-code/add-claude-opus-4-8

Conversation

@skoob13
Copy link
Copy Markdown
Contributor

@skoob13 skoob13 commented May 28, 2026

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/EU
    claude-opus-4-8 Bedrock inference-profile mapping.
  • services/llm-gateway/src/llm_gateway/products/config.py — allow
    claude-opus-4-8 for posthog_code (shared with slack_app) and
    background_agents.
  • services/llm-gateway/tests/test_bedrock.py,
    services/llm-gateway/tests/test_product_config.py — extend the
    parametrized 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, and SUPPORTED_MODELS_WITH_THINKING.
  • products/tasks/backend/temporal/process_task/utils.py — add
    reasoning-effort tuple for opus-4-8 (same shape as opus-4-7).
  • ee/hogai/eval/conftest.py — default --agent-model is now
    anthropic/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.py and
test_product_config.py were extended to exercise the new id; CI will
run them.

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

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.json was left to
the scheduled cost-update workflow; the opus-4-7 references in
ee/hogai/test/eval/test_acp_log_model.py are log-parsing fixtures
(not defaults) and were left as-is.


Created with PostHog Code

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
@github-actions
Copy link
Copy Markdown
Contributor

🎭 Playwright report · View test results →

⚠️ 2 flaky tests:

  • Change date range and toggle comparison (chromium)
  • Combine two series with a formula and verify computed total (chromium)

These issues are not necessarily caused by your changes.
Annoyed by this comment? Help fix flakies and failures and it'll disappear!

@skoob13 skoob13 marked this pull request as ready for review May 28, 2026 18:29
@skoob13 skoob13 requested a review from a team May 28, 2026 18:30
@assign-reviewers-posthog assign-reviewers-posthog Bot requested review from a team May 28, 2026 18:30
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 28, 2026

Reviews (1): Last reviewed commit: "feat(llma): add claude-opus-4-8 to ai ga..." | Re-trigger Greptile

@skoob13 skoob13 merged commit 81bb147 into master May 28, 2026
234 checks passed
@skoob13 skoob13 deleted the posthog-code/add-claude-opus-4-8 branch May 28, 2026 19:17
@deployment-status-posthog
Copy link
Copy Markdown

deployment-status-posthog Bot commented May 28, 2026

Deploy status

Environment Status Deployed At Workflow
dev ✅ Deployed 2026-05-28 19:54 UTC Run
prod-us ✅ Deployed 2026-05-28 20:09 UTC Run
prod-eu ✅ Deployed 2026-05-28 20:12 UTC Run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants