openai-agents ModelBehaviorError: "Tool transfer_to_Billing_Bot not found in agent a" (handoff names are snake_case)
Symptom: a scripted fake model calls transfer_to_Billing_Bot for Agent(name="Billing Bot") and the run fails with agents.exceptions.ModelBehaviorError: Tool transfer_to_Billing_Bot not found in agent a. Fix: the SDK normalizes the agent name to lowercase snake_case, so the tool is transfer_to_billing_bot. Read it from handoff(agent).tool_name, or from the handoffs argument passed to get_response (each Handoff has .tool_name), instead of hardcoding it. With the corrected name the handoff works: result.last_agent.name == Billing Bot and final_output is the target reply. Same fake model: Runner.run_sync(a, "hi", max_turns=2) with a model that always calls a tool raises MaxTurnsExceeded: Max turns (2) exceeded. An input guardrail with tripwire_triggered=True raises InputGuardrailTripwireTriggered. Versions: openai-agents 0.24.0, Python 3.12.