litellm/litellm-rust/crates/python-bridge
narmstrong-berry d60daa1663
fix(messages): keep integer temperature and top_p digits a float cannot hold and raise python's typeerror for a string max_tokens while capping the thinking budget on rust
temperature and top_p now deserialize through recognized::exact_float, which keeps an integer
where float(n) != n (beyond 2**53) as an unrecognized value with its exact digits, so it is sent
upstream and logged as the integer python forwards, and comparisons still go through scalar.rs

cap_thinking_budget_to_max_tokens compares max_tokens <= 1024 first, so a max_tokens python
cannot order against an int (a string, list or dict) raises TypeError "'<=' not supported between
instances of 'str' and 'int'" in both the reasoning effort translation and the adaptive effort
reshape. rust now returns ErrorDetail::UnorderableTypes there, the bridge raises it as a python
TypeError marked as a late rejection, and map_failure hands it to the caller unmapped
2026-11-11 20:24:30 +00:00
..
benches refactor(rust): add types and core-utils crates, unify the provider error 2026-09-17 22:01:14 -07:00
src fix(messages): keep integer temperature and top_p digits a float cannot hold and raise python's typeerror for a string max_tokens while capping the thinking budget on rust 2026-11-11 20:24:30 +00:00
tests refactor(rust): add types and core-utils crates, unify the provider error 2026-09-17 22:01:14 -07:00
AGENTS.md refactor(rust_bridge): route every Rust-to-Python call through host modules (#50822) 2026-11-11 01:57:54 +00:00
build.rs feat: package Rust OCR bridge in LiteLLM wheel (#31267) 2026-06-25 12:32:55 -07:00
Cargo.toml refactor(model-cost): move the cost map inputs, fetch and register_model overlay into Rust (#50501) 2026-11-10 02:37:35 +00:00
preflight_contract.json refactor(rust): move credential inheritance and the SDK limits out of the legacy callback crate into a driver preflight (#43259) 2026-09-26 01:09:36 +00:00