Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/agents/run_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,14 @@ class RunConfig:
the run continue.
"""

max_model_retries: int = 0
"""Maximum number of automatic retries when the model produces a malformed response that
triggers a ``ModelBehaviorError`` (e.g. invalid tool call JSON, nonexistent tool, etc.).

On each retry, the error message is fed back to the model as a synthetic user message so
the model can self-correct. Defaults to 0 (no retry).
"""


class RunOptions(TypedDict, Generic[TContext]):
"""Arguments for ``AgentRunner`` methods."""
Expand Down
Loading