Repository navigation
fix(roadmap): tool docstrings garble the answer format - #4486
Conversation
pydantic-ai reads a Google Returns: line as type: description, so it split the answer format of callers, file_symbols and search_code at its first colon. The summary of each docstring now holds the format, and the Returns: sections go. A test reads each read tool description as pydantic-ai sends it.
|
Test results for this pull request. fail-to-pass ( Targeted tests ( Descriptions before and after (the Full local CI ( No ConfigMap or cluster step is needed: the change adds and removes no setting. |
🤖 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>
pydantic-ai makes the description of each tool from the docstring of its function, with griffe and the Google style. griffe reads a
Returns:line astype: description, so it split the answer format ofcallers,file_symbolsandsearch_codeat its first colon. Each stage and refine request thus showed the model a broken format, withpathin a<type>part andline:contentin a<description>part.The summary of each of the three docstrings now holds the answer format, as
find_issuesalready does, and theReturns:sections go. Each description is now plain text with the whole format. The answer format of each tool does not change. A new test builds the tools of the stage toolbox and of the refine investigation, and asserts that each read tool description holds its answer format whole and that no description has a<returns>part.Closes #4482
Change:
openspec/changes/archive/2026-11-11-4482-tool-docstrings-garble-the-answer-format/