Skip to content

fix: correct Sonnet 5.5 cache read fallback pricing - #8381

Merged
Wei-Shaw merged 1 commit into
Wei-Shaw:mainfrom
r266-tech:codex/sonnet55-cache-read-pricing
Nov 10, 2026
Merged

Wei-Shaw merged 1 commit into
Wei-Shaw:mainfrom
r266-tech:codex/sonnet55-cache-read-pricing

Conversation

@r266-tech

@r266-tech r266-tech commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Correct Sonnet 5.5 cache-read fallback pricing to $0.10 per million tokens in the embedded catalog and both service fallbacks, matching Anthropic's pricing. Related to #8378.

Scope

As of 2026-11-03, the default remote catalog in Wei-Shaw/model-price-repo main reports cache_read_input_token_cost = 1e-7 for claude-sonnet-5-5 (main HEAD c19ce601e5391182eff9add6bcd4bd82e2691007). Sub2API checks the default remote catalog hash at startup and every 10 minutes. This PR aligns this repository's embedded catalog and hard-coded fallback for deployments that use those fallbacks; it does not update the separate mirror or recalculate historical charges.

Verification

  • go test ./internal/service: passed (218 seconds).
  • Existing catalog/fallback billing regression checks all three sources and model aliases; it failed before and passed after the change.

@YifeiLu-1

Copy link
Copy Markdown

@Wei-Shaw 这个sonnet缓存读的计费bug需要合并一下,现在是0.2 应该是0.1
image

@r266-tech

Copy link
Copy Markdown
Contributor Author

@YifeiLu-1,谢谢提醒。我核对了当前默认的 model-price-repo main,Sonnet 5.5 的 cache-read 已是 $0.10/MTok;Sub2API 默认会在启动时及每 10 分钟检查远端价格目录哈希。PR 描述已更新:本 PR 对齐本仓内置目录和硬编码 fallback,不修改外部镜像。

若你的实例使用默认 remote_url/hash_url 且完成一次同步后仍显示 $0.20,麻烦贴出 [Pricing] 同步日志并脱敏其中的敏感值。这个 PR 当前检查均通过,仍待维护者 review。

@YifeiLu-1

Copy link
Copy Markdown

@r266-tech 感谢解答,我找了一个最新的sonnet计价,cache-read价格已经更新了

hjkl950217 added a commit to hjkl950217/sub2api that referenced this pull request Nov 6, 2026
Co-Authored-By: Claude Code <noreply@anthropic.com>
@Wei-Shaw
Wei-Shaw merged commit 722bbf6 into Wei-Shaw:main Nov 10, 2026
9 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants