fix(catalog): account for auxiliary model charges - #4993
Conversation
Discovered pricing classification only inspected the prompt/completion pair, so a model with zero token rates but a positive auxiliary charge (request, image, web_search, ...) could classify as free. Scan every published pricing component: any positive rate is paid, any unusable component is unknown, and free still requires the complete zero pair.
|
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; 9 remain after this review. 📝 WalkthroughWalkthroughChangesPricing status classification
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to No actionable merge-blocking risk remains after the targeted pricing checks and regression coverage. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 |
|
✅ Deterministic PR hygiene checks passed. |
✅ READY
Review readiness checklist
✅ 4/4 boxes ticked. This pull request is already Ready for Review. |
리뷰 · 우선순위 73 / 80이 PR은 카탈로그 Free 필터용 고침은 점수는 높게 잡습니다. tip 버그가 코드로 확인되고, fail-closed 방향·회귀 테스트가 한 축입니다. 다만 모든 pricing 값을 rate로 해석하므로, 숫자/소수 문자열이 아닌 형제 키(예: 통화 표기 문자열)가 섞이면 예전엔 free/paid였던 행이 src/codex/catalog/model-hints.ts (discoveredPricingStatus) - tip은 prompt/completion만 판단. PR은 양수 성분 우선 paid → 미지원 성분 unknown → 완전 0쌍만 free. 주석도 계약에 맞게 고쳐졌습니다. 메인테이너의 판단이 필요한 지점
너의 추천 머지하세요. Free 필터 금액 사고 방지라 가치가 분명하고 변경 표면이 작습니다. tip에 올린 뒤 카탈로그 Free 표본만 한번 훑으면 됩니다. 라벨은 바꾸지 마세요. 이 댓글은 grok-bot이 작성했습니다 |
|
Merging with one macOS red that is a known The only failure at this head is That failure is deterministic and fast, so it is distinguishable from the timeout and cancellation pattern tracked in #4956; I am treating fast assertions as real results and timeouts as the known defect, rather than waving both through. |
Summary
discoveredPricingStatusonly inspected theprompt/inputandcompletion/outputpair, so a model whose token rates are zero but that publishes a positive auxiliary charge (request,image,web_search, ...) could classify asfreeand appear under a free-only filter.pricingobject throughdiscoveredPricingRate: any positive numeric rate ispaid, any unusable component isunknown, andfreestill requires the complete zero prompt/completion pair.Verification
8694d6cc6e6b791d720a0d0d20ffbe927138ccf3(tree0e72c21e033f4fc14742c73dc33608170378d395), based on devad9eab393b1125ca7bdfa3e83ed4fa0e0b0475e9.bun test tests/codex-integration/catalog-free-pricing-status.test.ts- 13 pass / 0 fail, including the two new auxiliary-charge cases.bun x tsc --noEmit- clean.bun run structure:check- passed.bun run privacy:scan- passed.bun scripts/file-size-ratchet.ts- passed.Remaining gates
gh workflow run ci.ymlon this branch: https://github.com/luvs01/opencodex/actions/runs/35289987101. The macOS control job is expected to cancel at the 30-minute mark; that is the known upstream limitation tracked in [Bug]: macOS control is cancelled near its 30-minute limit in full dispatch CI #4905, not a signal from this change. Occasional shard flakes are likewise known upstream noise.gui/files are touched, so the UI-screenshot gate does not apply.Checklist
Summary by CodeRabbit
Bug Fixes
Tests