mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-25 22:20:43 +00:00
The previous commit checked `in` before it read `file` or `mime_type`. For
an object that defines only `__getitem__`, Python answers `in` by indexing
it with 0, 1, 2 and so on, so a strict lookup raised KeyError: 0 and a
lookup that returns None for unknown keys never stopped
The `in` check now runs only for a Mapping, whose `in` reads its keys. Any
other document is read by item, and a KeyError means the caller left the
key out, as on the base
On lts/1.108.x the path sits under litellm-rust/, and the test hunk keeps
the line's `#[rstest::rstest]` attribute and its own validation test
(cherry picked from commit
|
||
|---|---|---|
| .. | ||
| benches | ||
| src | ||
| tests | ||
| AGENTS.md | ||
| build.rs | ||
| Cargo.toml | ||
| preflight_contract.json | ||