feat(models): add Claude Sonnet 5 to available models#3036
Merged
Conversation
Adds claude-sonnet-5 to the mobile model picker and grants it 1M context + effort support in the Claude adapter, mirroring Sonnet 4.6's capability profile (no xhigh). The desktop/web picker discovers it automatically from the gateway since it is not in BLOCKED_MODELS. Generated-By: PostHog Code Task-Id: f014a1c4-35e9-4468-abe8-7df96fe69786
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
Contributor
|
adboio
approved these changes
Jun 30, 2026
Keeps the Storybook model-picker mock representative of the real gateway list now that claude-sonnet-5 is selectable. Generated-By: PostHog Code Task-Id: f014a1c4-35e9-4468-abe8-7df96fe69786
charlesvien
approved these changes
Jun 30, 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
We want Claude Sonnet 5 selectable as a model in PostHog Code.
Changes
claude-sonnet-5("Claude Sonnet 5") to the mobile composer's static model picker, above Sonnet 4.6.claude-sonnet-51M-context and effort support in the Claude adapter (MODELS_WITH_1M_CONTEXT,MODELS_WITH_EFFORT), mirroring Sonnet 4.6's capability profile — effort levels low/medium/high, noxhigh(Opus-tier only).The desktop/web picker fetches models dynamically from the gateway's
/v1/modelsand only filters aBLOCKED_MODELSset, so Sonnet 5 surfaces there automatically once the gateway serves it — no list edit required there. The gateway ID is inferred asclaude-sonnet-5(matching theclaude-fable-5convention); adjust if the real ID/capabilities differ.Deliberately left alone:
GATEWAY_TO_SDK_MODEL(the full ID passes through rather than aliasing tosonnet, which resolves to 4.6) and theuseModelCatalogfallback / Storybook mocks (not load-bearing for availability).How did you test this?
vitest run packages/agent/.../models.test.ts— 32 passed, including the newclaude-sonnet-5capability test.Automatic notifications