Protocol Conversion

Programs talk to models in different “languages”, and the program’s language does not always match the vendor’s. It used to mean that every model needed its own program. Proxy Agent removes that dependency: it accepts a request in one language and then speaks to the model in the language it understands. That is what protocol conversion is.

Three engines

An individual “translator” in the product is called an engine. There are three, and which one works depends on the model’s provider type.

  • OpenAI — the most widespread language. The request is passed on almost unchanged.
  • Anthropic — the language of Claude. Also passed on almost unchanged.
  • DeepSeek — the “smartest” engine: it understands both languages and, when needed, rebuilds the request so the model accepts it.

What exactly gets converted

For ordinary vendors, “conversion” is freedom of choice: a program in the OpenAI language calmly works with an Anthropic model, and the other way around. Only the language of the call changes; the meaning of the request stays the same.

On the DeepSeek engine, fixing the request itself is added on top — vendors do not accept everything programs send:

  • Renaming fields — when a program sends the reply-length limit under an old name, it is translated into the one the vendor understands.
  • Dropping foreign fields — extra fields the vendor does not expect are not sent.
  • Cleaning thinking marks out of the text — service notes from “reasoning” are cut out of message texts.
  • Aligning roles — messages are brought into the order the vendor expects: system, user, model replies, tool results.

Every such fix is written to the log as its own row — from the record you can see exactly what was changed in the request.

What survives the conversion

Conversion does not break the familiar capabilities. These pass through it:

  • The streaming reply — when the answer arrives in parts as it is printed. The service markers of streaming mode are set by the proxy itself, so the vendor sends the reply in parts exactly as the program expects.
  • Tools — tool calls and their results, including the order they come back in.
  • The reply-length limit, temperature, stop sequences and the other usual settings.

DeepSeek “reasoning”

DeepSeek models keep hidden “reasoning” as they answer. The vendor requires it to be present in the following messages of the dialogue — so the product saves it and puts it back. Records are kept for 7 days.

If no record is found — say, the dialogue is old, or you switched to another model — the model’s setting from “Models & Prices” takes over: either a refusal with the clear message “Start a new chat”, or substituting a fixed placeholder. The first option is more honest — you learn right away that the dialogue has to start over.

What not to do

  • Do not mix languages on one address. The address /api/chat/completions is for the OpenAI language, /api/v1/messages for the Anthropic language. Send the other language’s body to the wrong address, and the vendor will not understand it.
  • Do not switch models inside one long dialogue without need. The new vendor has its own requirements for the history, and the dialogue may have to start over.
  • Do not guess between the two languages in one program. The easiest guide is the address the program itself substitutes — that is its language.

Next: what spending is made of and how the limits work — in the Costs & Limits section.

← Back to the documentation index