Skip to content

docs(providers): add Sail provider page - #1670

Open
devin-ai-integration[bot] wants to merge 9 commits into
mainfrom
litellm_add_sail_provider_docs
Open

devin-ai-integration[bot] wants to merge 9 commits into
mainfrom
litellm_add_sail_provider_docs

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Provider page for Sail (sail/ route), pairing with the merged BerriAI/litellm#42840. Same section layout as the other dedicated provider pages (Overview table, API Key, Models, SDK usage with Chat, Streaming, Tool Calling, Responses and Anthropic Messages, Proxy with SDK/cURL/Anthropic/Responses tabs, Cost Tracking, Custom Endpoints), plus Sail-specific sections for completion windows, unsupported parameters, forwarded request options, rate limits and the surfaces LiteLLM does not route. The parts of the merged behavior a reader would otherwise get wrong:

  • Completion windows are selected with OpenAI service_tier: flex and balanced map to the Sail windows of the same name, default and priority to asap, auto sends no window, values are case-insensitive, anything else is an UnsupportedParamsError unless drop_params is on
  • Chat rejects metadata.completion_window and extra_body.service_tier (billing reads service_tier); Responses accepts metadata.completion_window, plus standard (Sail's wire name for balanced, echoed in response metadata) billed as balanced, and 400s when it disagrees with service_tier; Messages ignores service_tier and bills asap
  • Not every model offers every window: Sail 400s on a window the model does not offer and LiteLLM does not pre-check, so gpt-oss-120b is asap-only and Qwen3.6 is flex-only (its cost row carries the flex price in the asap columns so an untiered call still bills right). The model table marks those cells "not offered" instead of implying an asap fallback
  • A background Responses request with no service_tier runs in a non-asap window Sail picks but is billed at asap, so the page says to always pass service_tier on background requests
  • Billing is per window from the cost map's *_balanced / *_flex fields at request time; a hand-called litellm.completion_cost(response) prices at asap (LIT-8651)
  • max_tokens and max_completion_tokens are both forwarded as sent; reasoning_effort and user are forwarded; stop, seed, penalties, logit_bias, logprobs, top_logprobs are the params LiteLLM knows Sail rejects

Also covers the flex plus background: true Responses pattern, Sail request options LiteLLM forwards untouched (idempotency, webhooks, Supercache, US routing, image limits), retry guidance, and the Sail surfaces not routed through LiteLLM (Batch, LoRA, count_tokens, response retrieval). Every mapping and price claim was checked against merged litellm main (litellm/llms/sail/, the sail unit tests, both cost-map files), Sail's completion-windows and pricing pages, and direct Sail calls for the per-model window rejections and the standard echo

Sidebar entry added under providers in the existing near-alphabetical block. Docs hold for LIT-8503

Link to Devin session: https://app.devin.ai/sessions/158efdfbb8e34665b001288e91a47ef2
Open in Devin Desktop: https://app.devin.ai/desktop/session/158efdfbb8e34665b001288e91a47ef2?variant=devin


Devin Review


Note

Low Risk
Documentation-only changes with no runtime, auth, or data-handling impact.

Overview
Adds Sail (sail/) provider documentation and registers it in the docs sidebar between s3_vectors and sambanova.

The new docs/providers/sail.md page documents env vars (SAIL_API_KEY, SAIL_API_BASE), twelve cost-mapped models, and usage for chat completions, streaming, Responses, and native Anthropic Messages. It highlights completion windows via metadata.completion_window (asap / balanced / flex)—not service_tier—including flex background Responses for long jobs.

Proxy examples show per-window deployments with deployment-level cost overrides for balanced/flex, plus sections on cost tracking, unsupported OpenAI params, rate limits, and features not exposed through LiteLLM yet.

Reviewed by Cursor Bugbot for commit 6322dd2. Bugbot is set up for automated code reviews on this repo. Configure here.

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@vercel

vercel Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
litellm Ready Ready Preview Sep 26, 2026 8:18pm UTC

Request Review

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 potential issues.

Devin Review

Comment thread docs/providers/sail.md
Comment on lines +199 to +207
curl http://localhost:4000/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $LITELLM_MASTER_KEY" \
-d '{
"model": "glm-5.3-flash",
"input": "hello from litellm",
"metadata": {"completion_window": "flex"},
"background": true
}'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Background requests have no spend logs

When the sample proxy sends a background request, background returns before usage exists. The background cost poller requires Postgres and the enterprise package; this configuration has neither, so it records no spend.

Learn more

A background Responses request returns before the provider finishes generating tokens. The proxy records its cost only when its background cost poller later retrieves a completed response. Background cost tracking states that this poller requires a Postgres database and the enterprise package. The proxy configuration in this page provides neither, so the example can submit a request but cannot record its final spend as the page promises.

Example: A user follows this proxy configuration and submits the flex request. The response starts as queued; when it completes, the proxy has no background poller to write its usage to a spend log.

Recommended fix: Provide a proxy setup with the required database and enterprise poller for the background example, or explicitly state that this minimal setup does not track background spend and point to the background cost-tracking prerequisites.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Comment thread docs/providers/sail.md Outdated
Comment on lines +203 to +206
"model": "glm-5.3-flash",
"input": "hello from litellm",
"metadata": {"completion_window": "flex"},
"background": true

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Flex requests use the asap price

When the Responses example requests flex, glm-5.3-flash still uses the asap cost map. Only glm-5.3-flash-balanced has price overrides, so flex usage is priced incorrectly.

Learn more

The proxy configuration defines glm-5.3-flash without pricing overrides. Its other deployment has balanced-specific rates. LiteLLM cannot derive a flex price from request metadata, so the flex request in the Responses example continues to use the asap price from the model cost map. The request's actual provider charge and its recorded price diverge whenever flex has a different rate.

Example: A caller sends the shown glm-5.3-flash request with completion_window: flex. Sail applies flex pricing, while the proxy resolves the default asap price for that deployment.

Recommended fix: Define a separate flex-priced deployment with all applicable token and cache rates, and use that deployment in the Responses example. Explain that per-request window overrides on the default deployment cannot automatically adjust LiteLLM cost tracking.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

@devin-ai-integration
devin-ai-integration Bot marked this pull request as ready for review September 24, 2026 01:48
@shreshth-berri

Copy link
Copy Markdown
Contributor

@greptileai

@shreshth-berri

Copy link
Copy Markdown
Contributor

bugbot run

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

@shreshth-berri

Copy link
Copy Markdown
Contributor

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 6322dd2. Configure here.

This branch was previously deployed

1 inactive deployment
Preview — cb81ea0b Deployed Sep 26, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant