-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Feature Request
Description:
The OpenAI Agents SDK documentation states that the Agent name parameter must be a string. However, when using third-party LLMs (e.g., LiteLLM with Anthropic’s Claude model), name=123 (integer) and name=True (boolean) work without errors due to Pydantic coercion to strings (e.g., 123 becomes "123", True becomes "True"). I propose:
- Updating the SDK code to explicitly support
intandbooleantypes for thenameparameter with automatic string conversion. - Updating the documentation to clarify that
intandbooleanare valid inputs. - Adding tests to verify this behavior across OpenAI and third-party LLMs.
Example:
from agents import Agent
agent = Agent(name=123, model="anthropic/claude-3.5-sonnet", instructions="Test")
print(agent.name) # Outputs: "123"Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request