Shapes the gateway accepts
The Vertex paths are what Google’s SDKs send with
vertexai=True: the full
path with a service account, the short one in express mode with an API key.
Project and location in the path are ignored; the upstream call uses the
registry’s own. The same Gemini and Vertex AI paths also take embeddings
actions; see Embeddings.
Only these exact paths exist; a near miss such as /v2/chat/completions is a
404, not a guess.
An AWS SDK talking to Amazon Bedrock does not need any of these dialects: the
native Bedrock Runtime paths (/model/{modelId}/converse and its siblings) are
accepted as well, and relayed to a Bedrock registry without translation. See
Amazon Bedrock Runtime.
X-AG-API-Key, x-api-key, x-goog-api-key, or
Authorization: Bearer, which is what lets stock SDKs point at the gateway
unchanged. Copy the exact form
from the application’s Connect tab; it already reflects the strategy and the
deployment.
The model field
model is where the client meets routing:
auto hands the choice to the gateway, a short name resolves to the first
registry that serves it, @provider/model prefers a provider. Gemini puts the
model in the path rather than the body; the rule is the same.
Model restrictions on the application apply before any provider is called. The
response carries X-Selected-Provider and X-Selected-Model, which is the first
thing to read when a request went somewhere you did not expect.
What translation costs you
Because the dialect and the provider can differ, the gateway normalises a few things once it knows which model it is talking to:
The last three rows are the honest limit of translation: fields that exist in one
provider’s API and nowhere else cannot be carried across. Everything in the
common core — messages, tools with names, temperature, streaming — is.
Streaming
Set"stream": true on OpenAI, Anthropic, Cohere and Responses; on Gemini call
:streamGenerateContent or add ?alt=sse. Events are re-encoded to the client’s
format.
A stream ends the way the client’s format says it does: data: [DONE] followed
by its blank line for OpenAI-shaped clients, message_stop for Anthropic,
response.completed for Responses, the last candidate’s finishReason for
Gemini, message-end for Cohere. A strict SSE parser sees every event.
If the upstream fails after the response has started, the HTTP status is
already 200 and cannot change. The gateway ends the stream with an error event
in the client’s format instead — upstream_error for OpenAI-shaped clients, an
event: error for Anthropic, an error object for Gemini — and no end marker, so
a truncated answer never looks finished. That covers a connection the provider
resets halfway and a stream it closes before its own end marker. An error the
provider sent in the stream reaches the client once, as the provider wrote it.
Native Bedrock streams end with Bedrock’s own exception frame. Bedrock Converse
and watsonx streams are not checked for an end marker.