litellm/docs/my-website
ishaan-berri 7a9a9f0c79
fix: batch-limit stale managed object cleanup to prevent 300K row UPD… (#25258)
* fix: batch-limit stale managed object cleanup to prevent 300K row UPDATE (#25257)

* Add STALE_OBJECT_CLEANUP_BATCH_SIZE constant

Configurable batch limit (default 1000) for stale managed object cleanup,
preventing unbounded UPDATE queries from hitting 300K+ rows at once.

* Batch-limit stale managed object cleanup with single bounded SQL query

Two fixes to _cleanup_stale_managed_objects:

1. Replace unbounded update_many with a single execute_raw using a
   subquery LIMIT, capping each poll cycle to STALE_OBJECT_CLEANUP_BATCH_SIZE
   rows. Zero rows loaded into Python memory — everything stays in Postgres.
   Uses the same PostgreSQL raw-SQL pattern as spend_log_cleanup.py
   (the proxy requires PostgreSQL per schema.prisma).

2. Extract _expire_stale_rows as a separate method for testability.

Keeps the file_purpose='response' filter to avoid incorrectly expiring
long-running batch or fine-tune jobs that legitimately exceed the
staleness cutoff.

* docs: add STALE_OBJECT_CLEANUP_BATCH_SIZE to env vars reference

* test: remove deprecated embed-english-v2.0 cohere embedding tests
2026-04-06 19:11:55 -07:00
..
blog [Docs] Add cosign Docker image verification steps to security blog posts (#25122) 2026-04-06 09:59:27 -07:00
docs fix: batch-limit stale managed object cleanup to prevent 300K row UPD… (#25258) 2026-04-06 19:11:55 -07:00
img [Nit] Small docs fix, fixing img + folder name (#25171) 2026-04-04 18:14:32 -07:00
release_notes [Nit] Small docs fix, fixing img + folder name (#25171) 2026-04-04 18:14:32 -07:00
src [Fix] Hide connector label on mobile, remove stale master key mention 2026-03-28 15:51:44 -07:00
static docs: cleanup image 2026-03-30 09:26:46 -07:00
.gitignore Inkeep searchbar and chat added to the Docs (#12030) 2025-06-26 10:13:42 -07:00
babel.config.js updating docs 2023-08-12 11:30:32 -07:00
Dockerfile fix docs warning (#7419) 2024-12-25 16:42:14 -08:00
docusaurus.config.js docs: cleanup (#25026) 2026-04-02 15:18:24 -07:00
index.md fix keys 2023-08-17 16:13:52 -07:00
package-lock.json [Fix] Remove neon CLI dependency and pin all JS dependencies 2026-04-01 16:15:32 -07:00
package.json [Fix] Remove neon CLI dependency and pin all JS dependencies 2026-04-01 16:15:32 -07:00
README.md updating docs 2023-08-12 11:30:32 -07:00
sidebars-release-notes.js update: ui and layout change 2026-03-17 01:55:27 +05:30
sidebars.js Litellm ishaan march23 - MCP Toolsets + GCP Caching fix (#25146) (#25155) 2026-04-04 16:23:21 -07:00

Website

This website is built using Docusaurus 2, a modern static website generator.

Installation

$ yarn

Local Development

$ yarn start

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

Build

$ yarn build

This command generates static content into the build directory and can be served using any static contents hosting service.

Deployment

Using SSH:

$ USE_SSH=true yarn deploy

Not using SSH:

$ GIT_USER=<Your GitHub username> yarn deploy

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the gh-pages branch.