An OpenAI Chat Completions proxy for Sail Research flex mode.
Sail's flex window only runs as a background job on the Responses API, which existing tooling can't use. This proxy accepts a normal /v1/chat/completions request, submits it to Sail as a flex background job, polls until it finishes, and streams the result back. Tool calls are supported.
Prebuilt binaries for Linux (amd64, arm64) are published on GitHub Releases.
curl -fsSL https://github.com/alshdavid/sail-proxy-rs/releases/latest/download/sail-proxy-rs-linux-amd64.tar.gz | tar -xz
./sail-proxy-rsOr build from source with cargo run.
SAIL_API_KEY=... sail-proxy-rs| Variable | Default | |
|---|---|---|
SAIL_API_KEY |
— | Required. |
SAIL_API_BASE |
https://api.sailresearch.com/v1 |
Sail API endpoint. |
SAIL_PROXY_ADDRESS |
0.0.0.0:9090 |
Address the proxy listens on. |
On startup the proxy checks GitHub Releases and prints a notice when a newer version is available. To update in place:
sail-proxy-rs --updatePoint any OpenAI-compatible client at http://localhost:9090/v1. For example, in opencode:
{
"provider": {
"sail": {
"npm": "@ai-sdk/openai-compatible",
"options": { "baseURL": "http://localhost:9090/v1" },
"models": {
"deepseek-flash": { "id": "deepseek-ai/DeepSeek-V4.1-Flash" }
}
}
}
}- Only streaming requests (
"stream": true) are proxied; non-streaming requests return a mock response. - The response arrives in one go once the job finishes; keep-alives are sent while waiting.
response_format: json_objectand non-function tools are not supported by Sail.