Skip to main content

Overview

The OpenAI Format Converter allows you to call Gemini and Anthropic models using the OpenAI SDK and API format. This is useful when you have existing code using the OpenAI SDK but want to access other providers’ models.

Configuration

SDK Configuration

Set your base URL to:
The SDK automatically appends /chat/completions, so you only need to set the base URL to /openai/v1.

cURL / Direct API

For direct API calls, use the full endpoint:

Usage Examples

Supported Models

You can use any Gemini or Anthropic model available on PipeLLM with the OpenAI format:

Feature Support

Gemini 3 Thinking and Thought Signatures

Gemini 3 models return a thoughtSignature 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.
The Chat Completions format has no per-tool-call field for these signatures, and this converter does not replay them. A response exposes only its first signature as a non-standard top-level thought_signature field, and tool_calls you send back in messages reach Gemini without signatures. Function calling with Gemini 3 models can therefore fail when you return tool results. For Gemini 3 tool use, prefer the native Gemini route or the Responses format, which replays signatures per function call.
Plain chat, streaming, and reasoning_content output with Gemini 3 are not affected. For Gemini 2.5 models, returning signatures is optional.

Thinking levels

For Gemini 3 targets, reasoning_effort values low, medium, and high map to generationConfig.thinkingConfig.thinkingLevel. The max_reasoning_tokens extension takes precedence when present and is mapped to a level, not an exact token budget. Gemini 2.5 uses a numeric thinkingBudget. The upstream model must support the requested level.