Overview
The Anthropic Format Converter allows you to call Gemini and OpenAI models using the Anthropic SDK and API format. This is useful when you have existing code using the Anthropic SDK but want to access other providers’ models.Configuration
SDK Configuration
Set your base URL to:The SDK automatically appends
/v1/messages, so you only need to set the base
URL to /anthropic.cURL / Direct API
For direct API calls, use the full endpoint:Usage Examples
- Python SDK
- TypeScript SDK
- cURL
Supported Models
You can use any Gemini or OpenAI model available on PipeLLM with the Anthropic format:Feature Support
Gemini 3 Thinking and Thought Signatures
Gemini 3 models return athoughtSignature on function call parts and reject
the next request in the same turn with 400 if the signature is not sent back
on the same part. This is a native model requirement; see Google’s
Thought signatures guide.
How this converter carries signatures:
- Non-streaming: the signature is returned in the
signaturefield ofthinkingblocks and in a non-standardsignaturefield ontool_useblocks. It is restored when you send those blocks back unchanged. If your code rebuildstool_useblocks fromid,name, andinputonly, the signature is lost. - Streaming:
tool_useblocks do not carry a signature. A signature is only emitted as asignature_deltaon a precedingthinkingblock, which does not restore it to the function call on replay.
Thinking levels
For Gemini 3 targets, enabledthinking.budget_tokens is mapped to a thinking level: up to 1,024 → LOW, 1,025–8,192 → MEDIUM, and above 8,192 → HIGH. This is an approximation, not a Gemini 3 token budget. Gemini 2.5 uses a numeric thinkingBudget. The upstream model must support the mapped level.