litellm/litellm/rust/crates/core-utils
yujonglee aae55f6162
refactor(rust): read config values and YAML with Python semantics (#52023)
* refactor(rust): read config values and YAML with Python semantics from python-compat and litellm-yaml

Move every Python-semantics reader used in config loading into python-compat,
give Lookup and its layering their own litellm-env crate, and load config YAML
through a PyYAML safe_load port on saphyr-parser.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(rust): cap YAML alias depth and pydantic int text length

An alias now counts the levels it brings in against MAX_DEPTH, so a chain
of shallow anchors can no longer build a tree deeper than the parser allows.

lax_int refuses integer text past pydantic's 4300 character cap before
parsing it, matching pydantic and keeping a huge upstream string from
running a quadratic BigInt parse.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 09:56:31 -08:00
..
src refactor(rust): read config values and YAML with Python semantics (#52023) 2026-11-16 09:56:31 -08:00
Cargo.toml chore: move workspace packages under litellm (#51000) 2026-11-12 04:19:57 +00:00