Repository navigation
feat(service): the Service keeps one model call in flight by default - #2627
Merged
Merged
Conversation
… default Add service.model_call_concurrency (default 1). A shared threading.Semaphore in the AI client holds the model call slot around _dispatch_messages, so a Service lane that cannot take it waits in the process, not at the gateway. The Service sets the slot from its setting at start; a CLI process sets no limit. fail-to-pass: 4 tests fail on main and pass with the change (uv run devops ci fail-to-pass --base main).
…e slot tests Add DEVOPS_CLI_SERVICE_MODEL_CALL_CONCURRENCY to the later-settings list in tests/test_config_declarations.py, which the gate's declaration test compares against. Shorten the sleeps and wait bound of the new slot tests so the suite stays inside the 300 s test budget.
dan-petty
marked this pull request as ready for review
October 29, 2026 07:27
dan-petty
pushed a commit
that referenced
this pull request
Oct 29, 2026
🤖 I have created a release *beep* *boop* --- ## [0.16.0](v0.15.1...v0.16.0) (2026-10-29) ### Features * **service:** the Service keeps one model call in flight by default ([#2627](#2627)) ([3fdafbd](3fdafbd)) ### Bug Fixes * **config:** remove the dead cloudflare.access settings ([#2632](#2632)) ([dde2f55](dde2f55)) * **roadmap:** read only the last comment as the job record ([#2630](#2630)) ([a3eb41f](a3eb41f)), closes [#2538](#2538) * **service:** check the GitHub budget for each request ([#2631](#2631)) ([99066e7](99066e7)) * **telemetry:** enable remote write 2.0 for created timestamps ([#2629](#2629)) ([e84a643](e84a643)), closes [#2506](#2506) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #2564
The roadmap Service runs one lane per repository, and each lane sends its model calls on its own thread. Several lanes send their model calls at the same time. The devops-background tier serves one model call at a time, and the gateway kills a call that waits 1100 s. So a round that starts many lanes at once holds its calls at the gateway, and the held calls time out.
This change adds service.model_call_concurrency (default 1). A shared threading.Semaphore holds the model call slot around the model call in _dispatch_messages, so a lane that cannot take the slot waits in the process, where no stall timer runs. The Service sets the slot from its setting at start; a CLI process sets no limit.
Tests: tests/test_ai_client_network.py (a dispatch call holds the slot; the slot admits only its limit), tests/test_service_limits.py (the Service keeps one model call in flight by default and installs its limit).
fail-to-pass: 4 tests fail on main and pass with the change.