Skip to content

fix(review): gate direct text batch submission - #1242

Draft
seonghobae wants to merge 1 commit into
fix-review-embedding-admissionfrom
fix-review-text-batch-admission
Draft

seonghobae wants to merge 1 commit into
fix-review-embedding-admissionfrom
fix-review-text-batch-admission

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

Scope

Issue #1106 follow-up stacked on Draft #1241. A direct CostRoutingCoordinator.submit_batch call could submit synthetic review text work to a batch backend while review allocation evidence was unavailable. The existing non-ZDR resolution returns requests unchanged, and the library API had no review preflight. The HTTP /api/v1/batch_routing_jobs route shares that submission path.

The change checks every batch item with the existing review allocation guard before target resolution or backend submission. The guard is outside the RuntimeError-to-BatchModelSelectionError conversion so its typed 400/503 response survives. Non-review coordinators retain the previous behavior.

RED and GREEN

  • RED at parent fix(review): gate direct embedding batch submission #1241 c2c72b6d: synthetic explicit-model direct batch reached mocked backend submit and failed the no-send assertion.
  • GREEN at 10133087: direct and HTTP batch requests return nonretryable 400 review_model_not_allowed for an explicit member or nonretryable 503 allocation_evidence_unavailable for orchestrator/free; zero backend submissions.
  • Local bounded suite: 168 passed with one pytest config warning. The separate expanded test collection mismatch identified in fix(review): gate direct embedding batch submission #1241 remains unresolved and is not claimed clean here.

Ingress inventory before commit: HTTP media/rerank routes share proxy_capability (#1240); sync/batch embedding HTTP uses _require_pool_model, and direct embedding batches use submit_embeddings_batch (#1241); text batch HTTP and direct library callers use submit_batch (this PR); synchronous Chat/Responses routes enter complete/proxy_completion admission (#1235). Retrieval/poll routes act on previously owned job handles and do not submit new work.

Draft/HOLD. No real data, secrets, provider egress, merge, or deployment. Required hosted checks, independent approval, calibrated allocation release, and consumer migration remain open.

@coderabbitai

coderabbitai Bot commented Sep 24, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant