Summary
Removed the pydantic-ai ModelRetry bridge from the tool layer and added a tinyAgent adapter that exposes TunaCode tools as tinyagent.AgentTool instances with the fixed execute(tool_call_id, args, signal, on_update) signature.
Changes
src/tunacode/tools/decorators.pyToolRetryErrornow passes through (no conversion topydantic_ai.ModelRetry).file_toolconvertsFileNotFoundErrortoToolRetryErrorinstead ofModelRetry.- Added
to_tinyagent_tool()to emittinyagent.AgentToolobjects. - Added best-effort OpenAI-function JSON schema generation from tool signatures.
src/tunacode/core/agents/agent_components/tool_executor.pyToolRetryErroris now treated as non-retryable by the automatic tool retry loop.
Tests
- Updated decorator/path-validation/retry tests to assert
ToolRetryErrorinstead ofModelRetry. - Added unit tests for
to_tinyagent_tool().
- Updated decorator/path-validation/retry tests to assert
Behavioral Impact
- Tool retry hints are now represented as
ToolRetryErrorall the way up to the agent loop. - Tools can be registered into tinyAgent without additional per-tool wrappers.
Related Cards
- [[tun-1658-tinyagent-migration]]