anomalyco / anomalyco/opencode
fix(llm): unified rate-limit utilization and status headers are dropped
@jlongster がすでに取り組んでいます。
2026年9月18日 から。
- 主要言語
- TypeScript
- スター
- 209k
- フォーク
- 27.5k
- PR マージ指標
- PR 指標を取得中
説明
Description
On an Anthropic subscription account, the rate-limit details parsed out of a response keep
anthropic-ratelimit-unified-5h-reset but drop anthropic-ratelimit-unified-5h-utilization and
anthropic-ratelimit-unified-status, which arrive in the same response.
rateLimitDetails in packages/llm/src/route/executor.ts matches
/^anthropic-ratelimit-(.+)-(limit|remaining|reset)$/. The unified windows report a spent
fraction instead of a remaining count, so -utilization matches nothing and is discarded, and
-status has no branch at all. A rate-limited account is therefore told when its window clears
and never how full it is.
If a response carries only unified headers, limit/remaining/reset all stay empty and the
emptiness check returns undefined, so there are no details at all.
OpenCode version
1.18.31 (dev)
Steps to reproduce
- Use an Anthropic subscription (OAuth) account, not an API key.
- Make a request that comes back with the unified headers:
anthropic-ratelimit-unified-5h-utilization,anthropic-ratelimit-unified-5h-reset,
anthropic-ratelimit-unified-status. - Inspect the parsed
HttpRateLimitDetails— the reset is present, the utilization and status are gone.
Operating System
macOS 26.0 (arm64)
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
評価
この issue はまだ評価されていません。