Repository navigation
fix(ai): a second Jev request on one model works - #4331
Conversation
Checks run before the push
The test that shows the defect ( The ruff check and format, the Live check (gateway, Jev live)Two requests on one model through
{"kind": "noul", "answer": "yes", "probability": 0.95, "confidence": null, "score": null,
"probabilities": {"yes": 0.95, "no": 0.05}, "model": "typesafe/jev-1.14-20261014",
"input_tokens": 279, "output_tokens": 20}Not runThe full |
2eedb52 to
18e6b92
Compare
decide_with_jev is the public one-request function of jev.py. It runs every request on one event loop that stays open (anyio blocking portal), so the HTTP client of a model no longer meets a closed loop. It replaces _run_decide, and the ask-jev command and the completeness check call it.
18e6b92 to
5a26003
Compare
Full
|
🤖 I have created a release *beep* *boop* --- ## [0.106.1](v0.106.0...v0.106.1) (2026-11-10) ### Bug Fixes * **ai:** a second Jev request on one model works ([#4331](#4331)) ([cdefdd6](cdefdd6)) * **ci:** the release publishes the mcp-server image ([#4334](#4334)) ([b4770d2](b4770d2)) * **roadmap:** a MODIFIED block gets the base scenarios it omits ([#4333](#4333)) ([8bd434f](8bd434f)) * **security:** renew MCP server Trivy ignores, bump kubectl, helm ([#4337](#4337)) ([ec4aabf](ec4aabf)) --- 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>
A second request on one Jev model failed with "Event loop is closed". The HTTP client of a model keeps connections that belong to the event loop of its first request, and
asyncio.runclosed that loop after each request.jev.pynow has the public functiondecide_with_jev(request, *, model=None, settings=None, model_settings=None). It runs every request on one event loop that stays open for the process (an anyio blocking portal), so one model serves any number of requests. It replaces the private_run_decide. The helpers ofjev.py,devops ai ask-jevand the completeness check call it, and the eval of the check uses one model for all cases._run_decideis removed. A branch that imports it callsdecide_with_jev(request, model=model).This also delivers the public function of #4309. The form allows one closing line, so #4309 needs a manual close after the merge.
Closes #4319
Change:
openspec/changes/archive/2026-11-10-4319-a-second-jev-request-on-one/