OpenAI-compatible
Configure openaicompatible deployments and understand provider-specific behavior.
Use this adapter for an API that implements OpenAI's Chat Completions (or compatible Images/Embeddings) contract but isn't one of the named providers — self-hosted vLLM/SGLang deployments, aggregators, or a provider Bifrost doesn't have a dedicated adapter for yet.
Configure a deployment
Send this body to POST /admin/deployments with an operator credential. Replace the example
credentials and choose a model available to your provider account. See
Creating deployments for the shared configuration fields.
{
"publicModel": "my-model",
"adapterKey": "openaicompatible",
"upstreamModel": "some-vendor/some-model",
"credentials": { "apiKey": "...", "baseUrl": "https://api.vendor.example/v1" }
}Behavior and limitations
- Credentials:
apiKey,baseUrl(both required — there's no built-in default host). - Default transport: Chat Completions for text,
imagesfor image generate/edit,videosfor OpenAI-shaped video APIs, andembeddingsfor embeddings. - Compatibility goal: this adapter covers the common OpenAI-shaped surface and stays extensible
through
catalogEntry,transportOverrides, andcredentials.headers. It does not promise perfect behavior for every aggregator quirk or proprietary OpenAI feature. - Strict tools: declare
capabilities.strictTools: trueonly when the target itself guarantees schema-adherent function arguments. The adapter forwards each tool'sstrictflag natively and rejects strict requests when the catalog does not make that guarantee. - Since the gateway can't know this model's real capabilities,
catalogEntryis required — declareoperations,capabilities, andparametersby hand. See Model catalog and the custom-model example in Creating deployments. - Aggregators and hosted compatible APIs use this same adapter with an explicit
baseUrl. If an operation needs a provider-specific transport shape, settransportOverridesexplicitly, such asimage.generate: "chat_completions"orvideo.generate: "videos_async". - If the target speaks vLLM/SGLang-style thinking controls (
chat_template_kwargs), declarereasoning.kind: "chat_template_flag"in the custom catalog entry — see Reasoning.
Next steps
- Creating deployments — the full custom-model example.
- Model catalog — the catalog entry a custom model must declare.