Files
galaxy/doc
Dannon Baker deb7ecd706 Make agent retry budget configurable via inference_services
ChatGXY's router was hard-failing with 'Exceeded maximum output retries (1)':
its pydantic-ai Agent used the default retry budget of 1, and the router's
process() only caught (OSError, ValueError), so an UnexpectedModelBehavior sailed
past the graceful _handle_fallback and surfaced to the user as a generic 500.

This adds a per-agent 'retries' knob to inference_services, resolved through the
same _get_agent_config chain as temperature/max_tokens and wired into every
agent's Agent(retries=...). The default goes from pydantic-ai's 1 to 3 so a
transient bout of non-conforming model output recovers instead of failing the
run. custom_tool's producer keeps its retries=0 reflection-loop default but can
now be overridden. The router also catches UnexpectedModelBehavior so a genuinely
exhausted budget degrades to the existing fallback message instead of a 500.

Adds unit tests for the resolution chain, the config->Agent wiring, and the
router's graceful fallback (forced via an empty ModelResponse).
2026-06-12 12:59:27 -04:00
..
2026-01-20 10:25:45 +00:00