litellm/docs/my-website
Varun Chawla c9c6a5edc9
Fix: Spend logs pickle error with Pydantic models and redaction (#20685)
* docs: add callback registration optimization to v1.81.9 release notes (#20681)

* docs: add callback registration optimization to v1.81.9 release notes

* Update v1.81.9.md

---------

Co-authored-by: Alexsander Hamir <alexsanderhamirgomesbaptista@gmail.com>

* Fix spend logs pickle error with Pydantic models

Replace copy.deepcopy() with Pydantic-safe serialization to avoid
"cannot pickle '_thread.RLock' object" errors when request/response
redaction is enabled.

Changes:
- Add _convert_to_json_serializable_dict() helper that uses
  model_dump() for Pydantic models instead of pickle
- Replace copy.deepcopy() calls in request and response redaction
  paths with the new helper function
- Recursively handles nested dicts, lists, and Pydantic models

Root cause: Pydantic v2 BaseModel instances contain internal
_thread.RLock objects for thread-safety. When copy.deepcopy()
attempts to pickle these objects, it fails because threading
primitives cannot be pickled.

Fixes #20647

* chore: remove unused copy import

Remove unused copy import that was causing lint failure. The copy.deepcopy()
calls were replaced with _convert_to_json_serializable_dict() helper function
in the previous commit, making the copy module no longer needed.

---------

Co-authored-by: ryan-crabbe <128659760+ryan-crabbe@users.noreply.github.com>
Co-authored-by: Alexsander Hamir <alexsanderhamirgomesbaptista@gmail.com>
2026-02-07 23:02:29 -08:00
..
blog docs: polish LiteLLM Observatory blog post (#20670) 2026-02-07 14:35:28 -08:00
docs docs: add SDK proxy authentication (OAuth2/JWT auto-refresh) documentation (#20680) 2026-02-07 22:57:04 -08:00
img Merge remote-tracking branch 'origin' into docs_yj_feb7 2026-02-07 14:40:21 -08:00
release_notes Fix: Spend logs pickle error with Pydantic models and redaction (#20685) 2026-02-07 23:02:29 -08:00
src docs/blog index page (#20188) 2026-01-31 15:11:45 -08:00
static feat: Add adopters page and data structure (#18605) 2026-01-03 21:51:19 +05:30
.gitignore Inkeep searchbar and chat added to the Docs (#12030) 2025-06-26 10:13:42 -07:00
.trivyignore security fix 2025-11-14 18:43:41 -08: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 fix 2025-12-20 15:21:00 +05:30
index.md fix keys 2023-08-17 16:13:52 -07:00
package-lock.json Overriding lodash-es with version 4.17.23 in docs 2026-01-22 12:13:40 -08:00
package.json fix critical CVE vulnerabliltes (#20683) 2026-02-07 22:23:01 -08:00
README.md updating docs 2023-08-12 11:30:32 -07:00
sidebars.js docs: add SDK proxy authentication (OAuth2/JWT auto-refresh) documentation (#20680) 2026-02-07 22:57:04 -08: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.