Repository navigation
docs(providers): add Sail provider page - #1670
devin-ai-integration[bot] wants to merge 9 commits into
Conversation
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| 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 | ||
| }' |
There was a problem hiding this comment.
🔴 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.
Was this helpful? React with 👍 or 👎 to provide feedback.
| "model": "glm-5.3-flash", | ||
| "input": "hello from litellm", | ||
| "metadata": {"completion_window": "flex"}, | ||
| "background": true |
There was a problem hiding this comment.
🟡 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.
Was this helpful? React with 👍 or 👎 to provide feedback.
|
bugbot run |
…nd unsupported surfaces
|
bugbot run |
There was a problem hiding this comment.
✅ 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.
… tool calling example
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:service_tier:flexandbalancedmap to the Sail windows of the same name,defaultandprioritytoasap,autosends no window, values are case-insensitive, anything else is anUnsupportedParamsErrorunlessdrop_paramsis onmetadata.completion_windowandextra_body.service_tier(billing readsservice_tier); Responses acceptsmetadata.completion_window, plusstandard(Sail's wire name for balanced, echoed in response metadata) billed asbalanced, and 400s when it disagrees withservice_tier; Messages ignoresservice_tierand billsasapgpt-oss-120bisasap-only andQwen3.6isflex-only (its cost row carries the flex price in theasapcolumns so an untiered call still bills right). The model table marks those cells "not offered" instead of implying anasapfallbackservice_tierruns in a non-asapwindow Sail picks but is billed atasap, so the page says to always passservice_tieron background requests*_balanced/*_flexfields at request time; a hand-calledlitellm.completion_cost(response)prices atasap(LIT-8651)max_tokensandmax_completion_tokensare both forwarded as sent;reasoning_effortanduserare forwarded;stop,seed, penalties,logit_bias,logprobs,top_logprobsare the params LiteLLM knows Sail rejectsAlso covers the
flexplusbackground: trueResponses 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 mergedlitellmmain (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 thestandardechoSidebar 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
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 betweens3_vectorsandsambanova.The new
docs/providers/sail.mdpage 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 viametadata.completion_window(asap/balanced/flex)—notservice_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.