Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks 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. Automatic ready-for-review conversion failed; please mark the pull request ready manually if it is still a draft. |
리뷰 · 우선순위 18 / 80이 PR은 네이티브 Chat Completions 빠른 경로가 내구성 spend 한도를 건너뛰던 구멍을 막습니다. 예전에는 Responses 실행 예산에만 spend tracker가 붙어서, native chat로 바로 나가는 요청은 root/identity/pool 토큰 천장에 예약·조회 없이 upstream으로 갈 수 있었습니다. 이제는 native 경로를 고를 때 입력 토큰 추정과 출력 ceiling을 logCtx에 넣고, 라인 - 메인테이너의 판단이 필요한 지점 native 경로의 입력 추정을 messages-only로 둘지, tools까지 넣을지. 문서의 “observer vs 직접 charge” 설명을 native 예외로 고칠지, 아니면 Responses만의 이야기라고 범위를 좁힐지. 너의 추천 구멍 자체는 맞고 회귀도 있으니, 문서 한 문단만 맞춘 뒤 readiness 체크리스트 채우고 draft를 풀면 됩니다. tools 추정은 이번 PR에서 같이 맞추거나 follow-up으로 명시해도 됩니다. types.ts/config.ts 분할이나 preview deploy 이야기는 이 PR과 무관합니다. 이 댓글은 grok-bot이 작성했습니다 |
8ebbb86 to
506e9d4
Compare
506e9d4 to
347204f
Compare
|
Consolidated into #5556 as a single related-function aggregate. Source head: The complete source matches carried 823a7d2 by stable patch ID, with author/date/provenance preserved. The integration also fixes the reviewed omission of tool definitions from the input estimate and proves refusal before any upstream send. Both native spend cases passed after explicit fixture shutdown and ACL-child reaping; source assertions and limits are retained. The final latest-dev merge leaves all 18 tested contribution files unchanged, with separate successful release-file/structure checks. Full final suite, hosted CI and security review remain pending on the draft replacement. Closing this duplicate standalone review entry as part of the requested consolidation after verifying coverage. This is not a merge or release claim; remaining integration checks and reviews are tracked on the replacement. Original branches are retained. |
Summary
src/server/chat-native.ts); populate native request spend metadata (input token estimate and output ceiling) when selecting the native route (src/server/chat-completions.ts).structure/transports/responses.mdthat native Chat participates in the same ledger enforcement.Verification
bun test tests/responses/chat-completions-endpoint.test.ts— 123 tests pass, including a new regression proving a configuredpool.maxTokensceiling yields a local 429 withx-opencodex-local-refusal: workflow_spend_exhaustedand no upstream contact.bun run typecheck— clean.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.