Skip to content

docs(response_api): document background mode and its cost polling job - #1443

Merged
shivamrawat1 merged 1 commit into
mainfrom
litellm_docs_background_responses_cost
Sep 12, 2026
Merged

shivamrawat1 merged 1 commit into
mainfrom
litellm_docs_background_responses_cost

Conversation

@shivamrawat1

Copy link
Copy Markdown
Contributor

The /responses page never mentioned background: true, and the background polling job that prices those responses (CheckResponsesCost, scheduled alongside CheckBatchCost in proxy_server.py) only appeared in the config_settings.md env var table and release notes. The batch cost poller is documented in managed_batches.md under Observability, and the budget reset job under Reset Budgets in users.md, so this was the one background cost job with no user-facing doc

This adds a Background Mode section to docs/response_api.md: how to create and poll a background response through the proxy, and how the cost gets recorded, since the create call returns before any tokens exist. It documents the polling schedule (proxy_batch_polling_interval / PROXY_BATCH_POLLING_INTERVAL, default 3600s plus up to 30s jitter), the per-cycle cap (MAX_OBJECTS_PER_POLL_CYCLE, default 50), the staleness cutoff (MANAGED_OBJECT_STALENESS_CUTOFF_DAYS, default 7), the PROXY_BATCH_POLLING_ENABLED=false kill switch shared with the batch poller, and that only the poller's retrieval is billed while user reads of GET /v1/responses/{id} stay free. Details verified against enterprise/litellm_enterprise/proxy/common_utils/check_responses_cost.py and litellm/proxy/response_api_endpoints/endpoints.py

@vercel

vercel Bot commented Sep 12, 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 12, 2026 5:54pm UTC

Request Review

@shivamrawat1
shivamrawat1 merged commit 511551b into main Sep 12, 2026
4 checks passed
@shivamrawat1
shivamrawat1 deleted the litellm_docs_background_responses_cost branch September 12, 2026 18:19
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