Repository navigation
fix: default Anthropic assistant to Claude Sonnet 5.5 - #3821
pcbeingused333 wants to merge 1 commit into
Conversation
|
@pcbeingused333 is attempting to deploy a commit to the HyperDX Team on Vercel. A member of the Team first needs to authorize it. |
🦋 Changeset detectedLatest commit: 2b0b260 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Hi @pcbeingused333, thanks for the pull request! Before we review code from a first-time contributor, a maintainer vouches for them, and you're not on our list yet. There's nothing else to file and this PR stays open — a maintainer will look at it, usually within a day or two, and vouch for you right here if it's a genuine attempt at the problem. To make that quick, check the PR description has:
More detail in our contributing guide. |
PR Review
3 finding(s): 🔴 0 P0/P1 · 🟡 1 P2 · 🔵 2 P3 None could be anchored to changed lines; they are listed below. 2 P3 folded at the bottom. Findings outside the changed lines
🔵 2 P3 — no action needed before merge
Priority comes from a separate grading pass over the finished review. P3 is folded here instead of posted inline. No finding blocks merge automatically; a maintainer decides. |
Deep Review✅ No critical issues found. The change is tightly scoped: the default Anthropic model string flips to 🟡 P2 — recommended
Reviewers (5): correctness, testing, maintainability, project-standards, kieran-typescript. Testing gaps:
No finding blocks merge automatically. A maintainer will expect P0/P1 findings in code this PR changes to be fixed; P2/P3 are your call -- fix or reply. Never fix findings about surrounding code here; reply instead. Do not widen the PR. How to respond |
Summary
The ClickStack AI assistant defaults to
claude-sonnet-4-5-20250929for Anthropic deployments that leaveAI_MODEL_NAMEunset. Anthropic retires that model on November 30, 2026 and recommendsclaude-sonnet-5-5as the replacement (model deprecations). After that date, the assistant would fail for every deployment relying on the default. This change switches the default toclaude-sonnet-5-5; an explicitAI_MODEL_NAMEstill takes precedence. The installed@ai-sdk/anthropic(4.0.65) already treatsclaude-sonnet-5*as supporting native structured output, so the existingOutput.objectcall needs no changes.The new model costs USD 2 / USD 10 per million input / output tokens, down from USD 3 / USD 15 (pricing). The LLM cost catalog had no entry matching
claude-sonnet-5-5(theclaude-sonnet-5pattern does not match the-5suffix), so spans from the new default would show no cost estimate. This adds the entry with its prompt-cache rates; the historical Sonnet 4.5 rates are kept.How to reproduce
Starting point: unit tests only; no API key or paid requests needed.
On
main(with only this PR's two test-file changes applied):cd packages/api && yarn jest --runInBand src/controllers/__tests__/ai.test.ts→uses default model when AI_MODEL_NAME is not setfails: expected"claude-sonnet-5-5", received"claude-sonnet-4-5-20250929".cd packages/app && yarn jest --runInBand src/llm/__tests__/cost.test.ts→uses Anthropic rates for Claude Sonnet 5.5fails (no catalog match).On this branch:
How to test on Vercel preview
N/A — non-UI change.
References
AI assistance was used to prepare this change and its tests.