Repository navigation
fix(devserver): honor request max_concurrency - #1072
Conversation
The playground and "+ Experiment" dialog now send max_concurrency to remote eval dev servers (braintrust#24075), but run_eval ignored it, so lowering the slider had no effect on remote evals. Parse max_concurrency from the eval request and pass it to EvalAsync, capped at the evaluator's own max_concurrency. The request can lower the limit but never raise it, so the playground's default of 10 cannot exceed a limit set in code. Refs: COR-288 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d96b8a6634
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "Codex (@codex) review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "Codex (@codex) address that feedback".
Follow-up to https://github.com/braintrustdata/braintrust/pull/24075, which made the playground and "+ Experiment" dialog send
max_concurrencyto remote eval dev servers. This PR makes the dev server honor it.Companion JS SDK PR: braintrustdata/braintrust-sdk-javascript#2730
Context
The playground Max concurrency slider and the "+ Experiment" Max concurrency field had no effect on remote eval tasks. braintrustdata/braintrust#24075 (merged) made the UI send
max_concurrencyin thePOST /evalrequest to the dev server, butparse_eval_bodynever read the field andrun_evalbuilt theEvalAsynckwargs only from the registered evaluator, so it was ignored. The value set on the Eval in code always won. A customer lowered the slider to avoid Azure 429s and saw no change (Pylon 20534, COR-288).Description
Parse
max_concurrencyfrom the eval request and pass it toEvalAsync.The request value can lower the evaluator's limit but never raise it (
min(request, evaluator); if the evaluator sets no limit, the request value applies). This is deliberate: the playground always sends a value and the slider defaults to 10, so letting the request override outright would silently raise every code-set limit below 10 (e.g.max_concurrency=5→ 10) as soon as users upgrade the SDK. The trade-off is that the UI can't push concurrency above what's in code.Other details:
nullor a missing value keeps the evaluator's limit, which also covers older UIs that don't send the field.>= 1). Values below 1 or non-numbers are rejected with a 400.Testing
nox -s test_clipasses (43 passed, 2 skipped);make lintis clean.eval --dev) from this branch against a Braintrust org, with a 12-row eval whose task records how many calls are in flight, and sentPOST /evalrequests shaped like the playground's. Same run against the released Python 0.49.2 (PyPI) for comparison:max_concurrencynullRefs: COR-288