-
Notifications
You must be signed in to change notification settings - Fork 1
fix(batch): gate real Batch API on declared batch_endpoint_supported #1021
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
seonghobae
wants to merge
7
commits into
main
Choose a base branch
from
fix/batch-endpoint-capability-gate
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
8ace8f4
fix(batch): gate real Batch API on declared batch_endpoint_supported
seonghobae 56559bb
Merge remote-tracking branch 'origin/main' into fix/batch-endpoint-ca…
claude ecac975
fix(tests): declare batch_endpoint_supported for real-Batch-API test …
claude ae2f3c2
Merge branch 'main' into fix/batch-endpoint-capability-gate
seonghobae b9ce1a2
Merge remote-tracking branch 'origin/main' into codex/pr1021-repair
seonghobae 4e36447
fix(batch): expose endpoint capability in admin API
seonghobae 61d5170
fix(batch): reconcile provider capability gate with current main
seonghobae File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| Fixed `ModelClient.batch_chat()` routing any worker agent selected by `TaskOrchestrator.batch_route()` straight into the real provider Batch API (`/files`, `/batches`, `/files/{id}/content`), even when that provider never implements it — a 404 there failed the whole batch group with no fallback. Added `ModelAgent.batch_endpoint_supported: bool | None` (mirroring `reasoning_effort_supported`'s fail-closed pattern, including agent-pool persistence); the real Batch API is now only addressed when an operator has explicitly declared `batch_endpoint_supported: true`. Every other remote agent (`None`/`False`, the default) falls back to the same per-item emulation `_local_batch_chat` already performs for local providers. | ||
|
|
||
| Evidence: OpenAI documents Batch as a separate asynchronous contract that uploads a purpose-`batch` JSONL file and creates a `/v1/batches` job for one declared endpoint and completion window; OpenAI-compatible chat alone therefore does not prove Batch support ([Create batch](https://developers.openai.com/api/reference/resources/batches/methods/create), [Upload file](https://developers.openai.com/api/reference/resources/files/methods/create)). Yu et al., “Orca: A Distributed Serving System for Transformer-Based Generative Models,” OSDI 2022, describes selective batching as an explicit serving-system mechanism rather than a universal model property ([paper](https://www.usenix.org/conference/osdi22/presentation/yu)). Together these support an explicit per-provider capability gate while preserving synchronous emulation for unproven providers. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.