Provider quirks¶
This document captures intentional differences between provider adapters.
OpenAI¶
to_openai(strict=True)setsadditionalProperties: falseand marks every property as required.- Canonical
$schemais stripped fromparametersin the OpenAI payload.
Anthropic¶
- Numeric and string constraints (
minLength,pattern, etc.) are moved into the propertydescriptiontext because Anthropic tool schemas are less expressive for some JSON Schema keywords.
MCP¶
to_mcp(inline_refs=True)(default) flattens$ref/$defsfor clients that do not resolve references (Claude Desktop, VS Code Copilot).- MCP uses camelCase keys:
inputSchema,outputSchema. - Return type annotations become
outputSchemawhen present.
Gemini¶
- JSON Schema
typevalues are uppercased (STRING,INTEGER,OBJECT, ...). - Output schemas are not emitted in the Gemini adapter in v0.1; parameters only.
Canonical IR¶
All adapters read from ToolDefinition only. Never regenerate schema inside an adapter.