You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the OpenAI Agents SDK’s handoff() helper with input_type (and even without), the returned Handoff instance populates its internal tool_name property but does not set a .name attribute. The Agent constructor then either:
Raises AttributeError: 'Handoff' object has no attribute 'name' when you pass it in handoffs=[…], or
Throws UserError("Unknown tool type: <class 'agents.handoffs.Handoff'>, tool") if you pass it in tools=[…].
The workaround today is to manually do:
hf = handoff(…)
hf.name = hf.tool_name
for every handoff, which is boilerplate and error-prone.
Steps to Reproduce:
Install latest openai-agents SDK.
Define a simple Agent and a Handoff without aliasing .name:
Description:
When using the OpenAI Agents SDK’s handoff() helper with input_type (and even without), the returned Handoff instance populates its internal tool_name property but does not set a .name attribute. The Agent constructor then either:
The workaround today is to manually do:
hf = handoff(…)
hf.name = hf.tool_name
for every handoff, which is boilerplate and error-prone.
Steps to Reproduce:
Expected Behavior:
so that consumers never need to patch each handoff manually.
Actual Behavior:
Proposed Fixes:
Environment:
Thank you for looking into this!
The text was updated successfully, but these errors were encountered: