AI Gateway

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.

ValueBehavior
Not set / false / 0Passthrough mode — requests are forwarded in OpenAI format (default)
true / 1Translation 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

DirectionNative providerModel prefix
OpenAI → Anthropicanthropicanthropic/
OpenAI → Googlegoogle, google-ai-studiogoogle/
OpenAI → Bedrockbedrockbedrock/

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 format

Response Headers

The gateway sets two response headers to indicate whether translation occurred and whether any fields were dropped:

HeaderValuesWhen set
Cova-Gateway-Modepassthrough (default) | translatedAlways set
Cova-Translation-WarningComma-separated list of dropped request fieldsOnly when translated and fields were dropped

Example

Cova-Gateway-Mode: translated
Cova-Translation-Warning: logprobs,top_k

This 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.

On this page