fix(usage): price OpenCode Go models missing cost estimates - #4898
Conversation
|
✅ Deterministic PR hygiene checks passed. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe change adds DeepSeek V4.1-Flash and Qwen3.8-Flash pricing data, five ChangesOpenCode Go pricing
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The added OpenCode Go model estimates are covered by resolution, membership, and cost-calculation tests, with no concrete merge-blocking risk identified. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
⏳ DRAFT
What to do
Review readiness checklist
0/4 boxes ticked. Automatic draft conversion failed. Please convert this pull request to a draft manually until every box above is ticked. |
리뷰 · 우선순위 76 / 80이 PR은 OpenCode Go로 실제로 나가는 다섯 모델 id의 Usage 추정 비용이 비어 보이던 구멍을 메운다. 대상 id는 증상은 Usage 화면에서 추정 비용이 고치는 방식은 데이터다. 테스트도 가격 경로에 맞춰 있다. 새 케이스 주의할 점은 세 가지다. 첫째, base가 tip보다 뒤라 exact-head CI 전에 tip( 라인 메인테이너의 판단이 필요한 지점
너의 추천 이 댓글은 grok-bot이 작성했습니다 |
e67d11d to
9a69bef
Compare
Five opencode-go ids (qwen3.8-max, qwen3.8-flash, deepseek-v4.1-flash, glm-5.3-flash, muse-spark-1.3-contributor) have no jawcode bundle row and no vendor-level fallback, so the Usage estimated-cost column and per-model breakdown rendered an em dash for every request through them. Add exact provider/model expected-price overlays reusing each vendor published list price as a verified-derived estimate (Go itself is subscription-billed).
9a69bef to
7195106
Compare
|
Hi @lidge-jun — flagging a CI infrastructure issue on this PR, not a code issue. Facts on head Why it matters: the readiness gate and the freshness automation both require terminal check states before this PR can leave draft. As long as these two jobs hang in queue, the PR is stuck regardless of the code being green — the automation keeps logging "CI still running, waiting" every 30 minutes and cannot tick the checklist. Could you take a look at the macOS runner availability / concurrency / queue configuration on your side? If those two lanes are not needed for this change (usage-price data + one test file), skipping them here would also unblock the PR. Thank you! |
Summary
~$0/ em dashes instead of estimated cost for five served model ids:qwen3.8-max,qwen3.8-flash,deepseek-v4.1-flash,glm-5.3-flash,muse-spark-1.3-contributor.opencode-gojawcode bundle row, and the model-level vendor fallback only searches jawcode metadata, never expected-price overlays — soresolveMatchedPricereturned null and the Usage estimated-cost column plus the per-model breakdown rendered an em dash for every request through them.opencode-go/<model>rows inEXPECTED_PRICE_OVERLAYSreusing each vendor's own published list price as averified-derivedestimate (Go itself is subscription-billed): Qwen3.8-Max 2/6, Qwen3.8-Flash 0.16/0.47, DeepSeek V4.1-Flash peak-window 0.30/1.20 with cache-hit 0.006, GLM 5.3 Flash from the z.ai USD table, Muse Spark 1.3 Contributor tier. No GUI code changed — the existingestimatedCostUsdpath now receives a number instead of null.qwen3.8-flash, 1.7k tokens): before — no cost (—); after — ~$0.0003 estimated.Verification
bun test tests/usage/usage-cost.test.ts— 98 pass / 0 fail (includes new test17hcovering all five ids plus an end-to-endestimateRequestCostcheck, and the overlay membership count 121 → 126).bun run typecheck— clean.bun test tests/usage— 695 pass / 1 fail; the single failure (usage-summary.test.ts› custom usage windows › intraday endpoints) reproduces on the clean tree without this change, so it is pre-existing and unrelated.estimatedCostUsdrendering).Checklist
Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
All CI tests are green on my local testing.
I pushed my PR to the latest dev commit.
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.
Summary by CodeRabbit
New Features
Tests