(parsed: Any, tool_name: str)
| 588 | ) |
| 589 | |
| 590 | def _normalize_tool_input(parsed: Any, tool_name: str) -> Any: |
| 591 | # Prefer JSON mode so structured params (datetime/UUID/Decimal, etc.) serialize cleanly. |
| 592 | try: |
| 593 | return params_adapter.dump_python(parsed, mode="json") |
| 594 | except Exception as exc: |
| 595 | raise ModelBehaviorError( |
| 596 | f"Failed to serialize structured tool input for {tool_name}: {exc}" |
| 597 | ) from exc |
| 598 | |
| 599 | async def _run_agent_impl(context: ToolContext, input_json: str) -> Any: |
| 600 | from .run import DEFAULT_MAX_TURNS, Runner |
nothing calls this directly
no test coverage detected