web_router.integrations.openai gives an OpenAI model the same two tools, as
function tool definitions:
definitions() is
the Responses API shape and chat_definitions() the Chat Completions one;
answer a call with function_call_output(call_id) or
tool_message(tool_call_id). call / acall take the arguments as the JSON
string OpenAI hands over, or already decoded, and arguments that are not valid
JSON come back as an error result the model can fix. The definitions are
strict, so OpenAI holds the model’s arguments to the schema. OpenAI has no
error flag on a tool’s output, so an error’s text says on its own that the
call failed or did not run. The tools keep their web_router_ names, so they
never collide with OpenAI’s built-in web_search either.
Back to Agent integrations.