Cross-Provider Translation
Translate OpenAI-format requests to Anthropic, Google, or Bedrock (opt-in)
The CoreValue AI Gateway accepts requests in OpenAI format by default. With cross-provider translation enabled, it can translate those OpenAI-format requests into the native request format of Anthropic, Google, or AWS Bedrock before forwarding — and map the native response back to OpenAI format on the way out.
This feature is opt-in and off by default.
Enabling Translation
Translation is controlled by the CROSS_PROVIDER_TRANSLATION_ENABLED environment variable on the gateway. It is off by default.
| Value | Behavior |
|---|---|
Not set / false / 0 | Passthrough mode — requests are forwarded in OpenAI format (default) |
true / 1 | Translation enabled for supported native providers |
When translation is enabled and you request a model with a native provider prefix, the gateway translates the request body to that provider's native format, forwards it, and maps the response back to OpenAI format.
Supported Translations
| Direction | Native provider | Model prefix |
|---|---|---|
| OpenAI → Anthropic | anthropic | anthropic/ |
| OpenAI → Google | google, google-ai-studio | google/ |
| OpenAI → Bedrock | bedrock | bedrock/ |
The anthropic/, google/, and bedrock/ prefixes are the native-provider prefixes added in M4. When translation is disabled, requests to these prefixes are still forwarded but in passthrough (OpenAI) format.
Requesting a Translated Model
Prefix the model name with the native provider prefix:
const response = await client.chat.completions.create({
model: "anthropic/claude-sonnet-4", // translated to Anthropic native format
messages: [{ role: "user", content: "Hello!" }],
});Other examples:
model: "google/gemini-2.0-flash" // → Google native format
model: "bedrock/anthropic.claude-3-sonnet" // → Bedrock native formatResponse Headers
The gateway sets two response headers to indicate whether translation occurred and whether any fields were dropped:
| Header | Values | When set |
|---|---|---|
Cova-Gateway-Mode | passthrough (default) | translated | Always set |
Cova-Translation-Warning | Comma-separated list of dropped request fields | Only when translated and fields were dropped |
Example
Cova-Gateway-Mode: translated
Cova-Translation-Warning: logprobs,top_kThis means the request was translated to a native provider format, and the logprobs and top_k fields were dropped because they have no equivalent in the target provider's API.
If your application depends on a field that appears in Cova-Translation-Warning, the translated request will behave as if that field was never set. Check this header when debugging unexpected behavior in translated mode.
What Is Not Translated
Path and authentication rewriting is not implemented in the current release (deferred). The gateway handles body translation and response mapping, but does not rewrite the upstream request path or swap authentication schemes beyond the standard key resolution.