mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-30 01:08:33 +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
|
||
|---|---|---|
| .. | ||
| cache | ||
| logger | ||
| routes | ||
| secrets | ||
| callable.rs | ||
| coercion.rs | ||
| credentials.rs | ||
| diagnostics.rs | ||
| errors.rs | ||
| execution.rs | ||
| http.rs | ||
| lib.rs | ||
| marshal.rs | ||
| preflight.rs | ||
| python_settings.rs | ||
| tokenizer.rs | ||