Skip to content

Commit 5402c06

Browse files
committed
docs: include link to UsageLimits for capping tool executions
1 parent 90fd4f1 commit 5402c06

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/tools.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1041,7 +1041,7 @@ When a model returns multiple tool calls in one response, Pydantic AI schedules
10411041
Async functions are run on the event loop, while sync functions are offloaded to threads. To get the best performance, _always_ use an async function _unless_ you're doing blocking I/O (and there's no way to use a non-blocking library instead) or CPU-bound work (like `numpy` or `scikit-learn` operations), so that simple functions are not offloaded to threads unnecessarily.
10421042

10431043
!!! note "Limiting tool executions"
1044-
You can cap tool executions within a run using `UsageLimits(tool_calls_limit=...)`. The counter increments only after a successful tool invocation. Output tools (used for structured output) are not counted in the `tool_calls` metric.
1044+
You can cap tool executions within a run using [`UsageLimits(tool_calls_limit=...)`](agents.md#usage-limits). The counter increments only after a successful tool invocation. Output tools (used for structured output) are not counted in the `tool_calls` metric.
10451045

10461046
## Third-Party Tools
10471047

0 commit comments

Comments
 (0)