feat: land four rebuilt heavy drafts (service tiers, request pacing, native chat, empty-completion guard) - #1752
Conversation
Port codex-router PR #145: a 200 that completes with no output text and no tool call is a failure the client cannot see (it silently records the turn as done). Hold pre-content adapter events, suppress the terminal of an empty turn, retry the IDENTICAL request once, and surface empty_completion_retry_failed when the retry is also empty or fails upstream. Usage is merged across both attempts so the request log meters the whole turn. Kill switch: OCX_EMPTY_COMPLETION_RETRY=0 restores the previous behavior. Compaction turns and combo attempts are excluded.
Add provider-wide and exact-model request-start pacing with dashboard controls, live queue status, management validation, transport coverage, tests, and localized documentation.
The non-streaming chat-native path now charges upstream bytes incrementally and cancels the locked reader on budget overflow. Cover overflow returning 413 and that the server remains responsive for the next turn, and document the invalid-JSON passthrough contract. No further product-code blocker per Ingwannu review. Refs #1467
# Conflicts: # src/server/responses/core.ts
# Conflicts: # src/server/responses/core.ts
|
✅ Deterministic PR hygiene checks passed. |
⏳ DRAFT
What to do
Automatic draft conversion failed (token cannot change draft status). Please convert this pull request to a draft manually. The required |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (80)
📝 WalkthroughWalkthroughChangesProvider runtime capabilities
Estimated code review effort: 5 (Critical) | ~120 minutes Possibly related PRs
Suggested reviewers: ✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 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 |
Summary\n\nLands four heavy cherry-pick-and-rebuilds from old draft PRs (triage: devlog/_plan/260815_old_draft_triage/), each rebuilt against current dev by worker agents, adversarially reviewed through three repair rounds, and composed with explicit cross-feature requirements:\n\n- #1521 per-model verified routed service tiers (#1436) — exact-model resolver on current wire-specific architecture (Responses capability never authorizes Chat; exact-model Chat capability added)\n- #1584 provider request pacing — bounded scheduler (256/60s caps), providerFetch runtime compat preserved, pacing state registered with generation reconciliation\n- #1569 native chat->chat for eligible openai-chat providers (#1467) — true raw-Chat fidelity (sentinel-probed: service_tier/seed/logprobs/metadata/message names survive), bounded SSE, redacted structured errors\n- #1655 opt-in empty-completion guard — default-OFF explicit opt-in, 1024-event/1MiB retention caps, stall-safe heartbeats, usage-attributed retry\n\nComposition (reviewer-verified): pacing keys on final resolved route; native path consumes pacing before its header timeout; identical retries consume a pacing slot and replay tier-gated bytes; native path explicitly excluded from the empty-completion guard. One suite-caught flight-authority defect in the 1521 resolver was root-caused and fixed (a65bfc0).\n\n## Verification\n\n- Remote full gates on ssh lidge @ a65bfc0 (this tip): 12336 pass / 11 skip / 0 fail (12347 tests, 785 files); typecheck, privacy:scan, lint:gui green.\n- Independent repair reviewer: PASS after three blocker rounds (native fidelity probe, pacing runtime compat + reconciliation, exact-model Chat authorization, runTurn pacing-rejection containment, flight authority).\n\n## Checklist\n\n- [x] Targets dev\n- [x] No token/secret logging added (structured provider errors redacted)\n- [x] Regression tests included for every behavior change and every composition requirement
Summary by CodeRabbit
New Features
Documentation