cai/src/agents
Rohan Mehta 944b730da9 Make the reset behavior on tool use configurable
## Summary:

#263 added this behavior. The goal was to prevent infinite loops when tool choice was set. The key change I'm making is:
1. Making it configurable on the agent.
2. Doing bookkeeping in the Runner to track this, to prevent mutating agents.
3. Not resetting the global tool choice in RunConfig.

## Test Plan:
Unit tests.
.
2025-03-25 13:29:32 -04:00
..
extensions Merge pull request #8 from openai/repo/gitignore 2025-03-11 11:17:37 -07:00
mcp [4/n] Add docs for MCP 2025-03-25 13:25:50 -04:00
models Make the reset behavior on tool use configurable 2025-03-25 13:29:32 -04:00
tracing Improve tracing error messages 2025-03-23 18:14:10 -04:00
util Pretty print result classes 2025-03-17 11:11:39 -04:00
voice Make the optional dependency installation compatible with zsh 2025-03-21 10:01:24 +09:00
__init__.py update tests 2025-03-20 13:08:38 -04:00
_config.py Add examples and documentation for using custom model providers 2025-03-12 17:34:38 -07:00
_debug.py Initial commit 2025-03-11 09:42:28 -07:00
_run_impl.py Make the reset behavior on tool use configurable 2025-03-25 13:29:32 -04:00
agent.py Make the reset behavior on tool use configurable 2025-03-25 13:29:32 -04:00
agent_output.py utils directory 2025-03-16 18:48:45 -04:00
computer.py Initial commit 2025-03-11 09:42:28 -07:00
exceptions.py Initial commit 2025-03-11 09:42:28 -07:00
function_schema.py fix: resolve linting issues 2025-03-12 16:00:20 +05:30
guardrail.py utils directory 2025-03-16 18:48:45 -04:00
handoffs.py utils directory 2025-03-16 18:48:45 -04:00
items.py Introduce tool_use_behavior on agents 2025-03-18 21:55:12 -04:00
lifecycle.py Initial commit 2025-03-11 09:42:28 -07:00
logger.py Initial commit 2025-03-11 09:42:28 -07:00
model_settings.py Add max_tokens and documentation to model settings 2025-03-12 13:35:10 -07:00
py.typed Create py.typed 2025-03-21 11:16:24 -04:00
result.py Pretty print result classes 2025-03-17 11:11:39 -04:00
run.py Make the reset behavior on tool use configurable 2025-03-25 13:29:32 -04:00
run_context.py Initial commit 2025-03-11 09:42:28 -07:00
stream_events.py revert src/ change per request 2025-03-22 01:06:01 +01:00
strict_schema.py Initial commit 2025-03-11 09:42:28 -07:00
tool.py Introduce tool_use_behavior on agents 2025-03-18 21:55:12 -04:00
usage.py Initial commit 2025-03-11 09:42:28 -07:00
version.py Initial commit 2025-03-11 09:42:28 -07:00