kodee
← all posts

>proxima - when gemini speaks gpt

I wanted to use gemini-4-argon in my everyday client. The client spoke OpenAI; the endpoint spoke Google's Generative AI format. So I built a small proxy to connect them.

It's called proxima. Point an OpenAI-compatible client at it, send your own key, and it translates requests and responses in both directions. Chat completions, streaming, tool calls — enough to keep using the tools I already have without waiting for native support.

the bits that didn't quite line up

The basic translation is straightforward. Conversation history is where the differences start to matter.

  • Thought signatures

Gemini 4 models expect thought signatures when you replay tool calls. If those signatures disappear on the way through an OpenAI-style conversation, the next request can fail with a 400. proxima relies on the AI SDK's skip-signature fallback when they aren't available. That gets around the validation error; it doesn't recover the missing signatures.

  • Tool result names

An OpenAI tool-result message can refer to a call by ID without repeating the function name. Google expects the name too. proxima looks back at the assistant's tool calls, matches the ID, and fills it in.

  • System messages

proxima pulls system messages out of the conversation and passes them through the SDK's dedicated system-prompt parameter.

None of these is a particularly large piece of code. Together, they're the difference between getting a response to one prompt and keeping a conversation with tool calls working.

try it

git clone https://github.com/kodee2k/proxima.git
cd proxima
npm install
npm start

Set your client's OpenAI base URL to http://localhost:8787/v1 and use the key accepted by your upstream endpoint. The README covers the default endpoint and configuration options.

That's proxima. A small piece of plumbing so I can try a different model and get back to what I was doing.