Skip to content

fix(ai): a failed model transport names its phase and its error - #4460

Merged
dan-petty merged 2 commits into
mainfrom
fix/4345-model-call-names-transport-cause
Nov 11, 2026
Merged

dan-petty merged 2 commits into
mainfrom
fix/4345-model-call-names-transport-cause

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

On 2026-11-10, 6 of 48 cases of devops roadmap eval verify failed with The investigation's model call failed (ModelConnectionError). The message named only the class, so the stored reports could not show the cause. The gateway and cloudflared logged no error at the six times, and no stream through the tunnel was canceled. The roadmap Service, which calls the gateway inside the cluster, logged no ModelConnectionError in 7 days. The failure is on the path between the client host and the edge of the tunnel, outside the project (proposal, Feasibility).

model_call_error now adds, for a ModelConnectionError or a ModelTimeoutError, the transport phase that pydantic-ai gives and the class and the masked text of the first error of the cause chain. The next failure then names a refused connection, a failed name lookup or a dropped stream. The change adds no retry.

Closes #4345

Change: openspec/changes/archive/2026-11-11-4345-model-call-names-transport-cause/

model_call_error adds, for a ModelConnectionError or a
ModelTimeoutError, the transport phase from pydantic-ai and the class
and the masked text of the first error of the cause chain. The stored
report of a failed eval case then tells a refused connection, a failed
name lookup and a dropped stream apart. The change adds no retry.
@dan-petty dan-petty added type/bug Type bug: the code does not do what it must scope/ai AI review pipeline, personas, prompts, LLM client, or RAG labels Nov 11, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Fail-to-pass: uv run devops ci fail-to-pass --base origin/main on the fix commit. The 3 new tests fail on the base and pass on the head:

failed on base: tests.roadmap.refine.test_roadmap_refine_investigation::test_the_error_of_a_failed_transport_hides_a_secret_in_its_text (assert (False, False) == (False, True))
failed on base: tests.roadmap.refine.test_roadmap_refine_investigation::test_a_failed_transport_names_its_phase_and_its_error[connect-timeout] (AssertionError: assert 'The investig...imeoutError).' == 'The investig...nectTimeout).')
failed on base: tests.roadmap.refine.test_roadmap_refine_investigation::test_a_failed_transport_names_its_phase_and_its_error[dropped-stream] (AssertionError: assert 'The investig...ectionError).' == 'The investig...a response.).')
3 failed on base (3 failed and 60 passed in tests/roadmap/refine/test_roadmap_refine_investigation.py; 0 errored).

Other local runs on the fix commit: the tests of every caller of model_call_error (tests/roadmap/test_roadmap_alternatives.py, tests/roadmap/refine/test_roadmap_refine_gateway_failures.py, tests/roadmap/stage/test_roadmap_stage_toolbox.py, tests/roadmap/stage/test_roadmap_stage_refused_reply.py, tests/ai/client/test_roadmap_agent_run.py, tests/roadmap/implement) passed (1891 passed); ruff check and mypy of the changed files passed. The host load average was near 50, so this PR relies on the GitHub checks for the full test run, not on a full local devops ci.

@dan-petty
dan-petty marked this pull request as ready for review November 11, 2026 03:09
@dan-petty
dan-petty enabled auto-merge (squash) November 11, 2026 03:09
@dan-petty
dan-petty merged commit 54743c4 into main Nov 11, 2026
32 checks passed
@dan-petty
dan-petty deleted the fix/4345-model-call-names-transport-cause branch November 11, 2026 03:23
dan-petty pushed a commit that referenced this pull request Nov 11, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.111.0](v0.110.0...v0.111.0)
(2026-11-11)


### Features

* **roadmap:** a decision-point registry with a resolver chain
([#4453](#4453))
([b73e97a](b73e97a))
* **roadmap:** eval verify stores each case and resumes
([#4451](#4451))
([7c59565](7c59565))
* **roadmap:** extend a step budget when the run makes progress
([#4464](#4464))
([c8ed108](c8ed108))


### Bug Fixes

* **ai:** a failed model transport names its phase and its error
([#4460](#4460))
([54743c4](54743c4))
* **ai:** price the DeepSeek group and its cached input
([#4454](#4454))
([3b1f6bd](3b1f6bd))
* **roadmap:** stage and refine send no answer count or row
([#4484](#4484))
([d9c8ee8](d9c8ee8))
* **roadmap:** tool docstrings garble the answer format
([#4486](#4486))
([2f6114f](2f6114f))


### Performance Improvements

* **roadmap:** parse only the bodies that hold a job record
([#4455](#4455))
([c653bde](c653bde))
* **tests:** evaluate hour-scale promtool tests every hour
([#4462](#4462))
([0ac2f76](0ac2f76))

---
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/ai AI review pipeline, personas, prompts, LLM client, or RAG type/bug Type bug: the code does not do what it must

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(ai): the verify eval agent run fails with ModelConnectionError

1 participant