Repository navigation
fix: default Anthropic assistant to Claude Sonnet 5.5 - #3821
pcbeingused333 wants to merge 2 commits 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: 7ee8d53 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 |
AI review gate — Human approval in place of AI reviewApproved on the head commit by pulpdrew (write access, not the author), standing in for the AI review:
What to do:
Evaluated at |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
Reviewed by Cursor Bugbot for commit 7ee8d53. Configure here.
| // prettier-ignore | ||
| const ANTHROPIC: PriceTuple[] = [ | ||
| // https://platform.claude.com/docs/en/about-claude/pricing | ||
| ['claude-sonnet-5-5', `${A}claude-sonnet-5-5${AV}`, 2e-6, 10e-6, 2e-7, 2.5e-6], |
There was a problem hiding this comment.
Wrong Sonnet 5.5 cache-read rate
Medium Severity
The new claude-sonnet-5-5 catalog entry sets cachedInputPricePerToken to 2e-7 ($0.20/MTok), the Sonnet 5 cache-read rate. Anthropic prices Sonnet 5.5 cache hits at $0.10/MTok (1e-7, 0.05x input). Input, output, and 5-minute cache-write rates match. Spans that use prompt caching therefore overstate cache-read cost by 2x in both the UI estimate and the ClickHouse cost SQL.
Reviewed by Cursor Bugbot for commit 7ee8d53. Configure here.


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.
Note
Low Risk
Small configuration default and pricing-catalog update ahead of model deprecation; custom
AI_MODEL_NAMEbehavior is unchanged.Overview
Switches the default Anthropic assistant model from the retiring
claude-sonnet-4-5-20250929toclaude-sonnet-5-5whenAI_MODEL_NAMEis unset; explicitAI_MODEL_NAMEstill overrides.Adds a dedicated LLM cost catalog entry for
claude-sonnet-5-5(including prompt-cache rates) so spans from the new default get cost estimates—the existingclaude-sonnet-5pattern did not match the-5-5id. Unit tests for model selection and pricing are updated accordingly.Reviewed by Cursor Bugbot for commit 7ee8d53. Bugbot is set up for automated code reviews on this repo. Configure here.