Overview
Wafer is an OpenAI-compatible provider with a dedicated Bifrost provider implementation. Bifrost uses the shared OpenAI-compatible request and response converters, while preserving Wafer-specific extra parameters. Key characteristics:- OpenAI-compatible chat - Chat Completions use
/chat/completions - Streaming support - Server-Sent Events for chat and text completions
- Tool calling - Function tools are passed through using the OpenAI-compatible schema
- Reasoning support - Reasoning models return reasoning via
reasoning_content - Responses API - Supported by converting Responses requests to Chat Completions internally
- Text completions - Text completions use Wafer’s
/completionsendpoint - File uploads - Upload media once and reference it by
file_idin chat requests
Supported Operations
Setup & Configuration
Configure Wafer as a provider.- Web UI
- config.json
- API
- Go SDK
- Navigate to Models > Model Providers. Look for Wafer under Configured Providers. If it is missing, click on Add New Provider and select Wafer.
- Click Add Key or edit an existing key.
- Set a name for your key.
- Paste your API key directly or use an environment variable (for example,
env.WAFER_API_KEY). - Set Allowed Models to All Models (default) or the specific model allowlist you want this key to serve.
- To upload files, enable Use for Batch APIs on the key (this flag also gates file operations).
- Save the provider configuration.
1. Chat Completions
Request Parameters
Wafer supports OpenAI-compatible chat completion parameters. For the full parameter reference and message conversion behavior, see OpenAI Chat Completions. Available chat models includeglm-5.2 and kimi-k2.6.
Reasoning Parameter
Wafer delegates throughToOpenAIChatRequest with provider-specific compatibility handling. Reasoning models return reasoning content via reasoning_content.
Assistant-message reasoning details are stripped before sending follow-up messages because Wafer rejects reasoning_details in assistant messages.
Extra Parameters
Wafer enables passthrough extra parameters for chat and text completion requests. Provider-specific options can be sent throughextra_params without being dropped by Bifrost.
Wafer fails fast on unsupported parameters, returning an error rather than silently ignoring them. Bifrost filters OpenAI-specific parameters before forwarding to avoid these rejections.
2. Responses API
Bifrost converts Responses API format to Chat Completions internally, then converts the response back:3. Text Completions
Wafer supports text completions through/completions:
Response returns
choices[].text with completion text. Streaming text completions use Wafer’s OpenAI-compatible SSE format on /completions.
4. List Models
Lists available models from Wafer through/models.
5. File Upload
Upload a file once and reference it byfile_id in later chat requests, avoiding per-request body size limits. Wafer accepts raw file bytes with metadata in HTTP headers (not a multipart form):
Content-Type- the file’s MIME type (required; validated against the purpose)X-Wafer-Purpose-vision,document, orvideo(required)X-Wafer-Filename- optional label
/files and return a file_id. Files expire after 30 days.
File operations reuse the batch key filter: only keys with Use for Batch APIs enabled are eligible. Enable it on at least one Wafer key, or uploads fail with
no config found for batch apis.Referencing a file in a chat completion
Reference an uploaded image by nesting itsfile_id inside image_url (in place of url):

