ManyLayers speaks the OpenAI API to your applications and the native API to each provider. You bring the provider account and its credential; the gateway translates the request, authenticates upstream, and returns an OpenAI-shaped response whichever provider served it.

Two ways to add a provider

Requests that carry a workspace-bound key resolve models from the workspace’s console providers only; models[] in gateway.yaml serves keys bound to no workspace and the endpoints above that a console account cannot serve. See Model resolution.
Azure OpenAI can be selected in the console, but a workspace provider row has no place for a deployment name, so requests to it fail with provider_unavailable. Configure Azure in gateway.yaml. Every other console type, including Bedrock and Vertex, is served from the console.

Provider types

provider_type is the id used by the API and by gateway.yaml. The default base URL is what the console fills in when you leave the field empty. Only self_hosted and ollama may be saved without a credential; every other type needs one, except that a Vertex account can use the gateway’s own Google identity and an AWS assumed-role account can be assumed with the gateway’s own AWS identity. A pasted key is checked against the provider’s key format when the account uses the default endpoint (it is skipped when you set your own base URL): OpenAI keys start with sk-, Anthropic sk-ant- (Admin keys are refused for Anthropic and OpenAI), xAI xai-, Cerebras csk-, and Google Gemini accounts accept both the older AIza… keys and the newer AQ.… AI Studio keys.
In gateway.yaml, only twelve OpenAI-wire presets get a default upstream_url: mistral, groq, deepseek, together, perplexity, xai, fireworks, openrouter, cerebras, ai21, sambanova and ollama. For openai, anthropic, gemini, cohere and typesafe, set upstream_url explicitly. The ollama preset defaults to http://localhost:11434, unlike the console’s https://ollama.com.

How requests reach each provider

  • A translated provider that cannot serve an endpoint at all (for example /v1/completions to Anthropic) is refused by the gateway without an upstream call. The caller sees 502 provider_unavailable; the gateway log records which endpoints the provider does serve.
  • Moderation is forwarded to a gateway.yaml openai or azure model. For any other model, or no model, the gateway answers itself from its PII and prompt-firewall scoring.
  • Bedrock embeddings take one input per upstream call, so the gateway fans a batch out and reassembles one OpenAI response.
  • TypeSafe answers typed questions: every request must set response_format to a json_schema, and stream: true is refused.
  • Perplexity is translated to its Agent API; Sonar model names map to Agent API presets.

Parameter support on translated providers

Native-format adapters honour only what they can translate. A parameter that would change the result and cannot be honoured is refused with a 400 (code unsupported_parameter) naming it in error.param, never silently dropped. Inert values (n: 1, tool_choice: "auto", parallel_tool_calls: true, a zero penalty) always pass. For a Claude model on Vertex (a name like claude-…@… or anthropic/…) the anthropic column applies instead of the Gemini one: tools, forced tool_choice, parallel_tool_calls: false and reasoning_effort are accepted, and json_object, json_schema, n > 1, seed, logprobs and penalties are refused. Gemini, Vertex, Bedrock and Cohere also refuse image or document parts they cannot send (for example a remote image URL to Bedrock, which takes inline bytes only), naming the part. OpenAI-wire providers, azure, databricks and sagemaker are not checked: the body goes upstream as sent.

Authentication upstream

The caller’s own Authorization header is never forwarded.

Adding a provider in the console

Open Gateway → Providers and choose a provider from the gallery (Add other providers once one is connected). The setup has two steps:
  1. Configure Account. Give the account a name (unique in the workspace; a second account of the same provider serves its models as account/model), a base URL where the type needs one, and a credential: paste the key, or give a reference such as ${OPENAI_API_KEY} or ${vault:secret/data/llm#openai} (see Credentials). Bedrock-family accounts ask for an AWS region, Vertex for a Google Cloud project and region (leave the project empty for express mode with an API key), and Claude Platform on AWS for the Claude workspace id. Test Credentials checks the account before you save.
  2. Models Selection. Pick the models the account serves from the provider’s own listing, or add one manually with Add Model Manually. See Model selection.
Requests then use the model name you registered. Disabling or deleting a model, or the account, stops resolving it immediately.

gateway.yaml examples

gateway.yaml
The gateway rewrites the path to /openai/deployments/{upstream_model}/... and adds api-version (default 2024-06-01, set per upstream with api_version).
gateway.yaml
In the console: type Anthropic, base URL left empty, paste the key.
gateway.yaml
In gateway.yaml, Vertex uses express mode: an API key in x-goog-api-key, calls to {upstream_url}/v1/publishers/google/models/{model}. Project-scoped Vertex accounts (service account, external account or the gateway’s Google identity) are set up in the console.
gateway.yaml
Requests use the Converse API and are signed with SigV4. aws_region is required. The key is ACCESS_KEY:SECRET_KEY[:SESSION_TOKEN], or a Bedrock API key.
gateway.yaml
gateway.yaml
Omit upstream_url and the preset default is used. In the console, choose the type and paste the key.
gateway.yaml
Neither a credential nor, in gateway.yaml, a URL is required for a local Ollama. The console’s Ollama type defaults to https://ollama.com instead; set the base URL to point it at your own server.
gateway.yaml
In the console, self_hosted has no default address: the account or each model names its server’s URL, with the server recorded as vLLM, Ollama, SGLang or TGI. A URL ending in /v1 is accepted. In gateway.yaml, serve a self-hosted server as a plain OpenAI-wire model with an explicit URL.
gateway.yaml
Every request must carry response_format: {"type": "json_schema", ...}; each schema property is a question. Answers come back as JSON in choices[0].message.content, with probabilities in a typesafe field beside choices.
gateway.yaml

Model entry fields (gateway.yaml)

Next steps

Model resolution

How a requested name becomes a provider call.

Virtual models

Put fallback, weighting and canaries behind one model name.

Credentials

Gateway keys for callers and how provider credentials are stored.

Budgets & cost tracking

How prices become spend and limits.