mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-09 22:31:41 +00:00
GigaChat reports prompt_tokens and total_tokens after subtracting cached tokens (the docs example is prompt_tokens=1, precached_prompt_tokens=37, total_tokens=5, so the fields are disjoint, not a subset). Map to the OpenAI convention by adding precached_prompt_tokens back onto prompt and total while still surfacing it as prompt_tokens_details.cached_tokens. |
||
|---|---|---|
| .. | ||
| test_gigachat_chat_streaming.py | ||
| test_gigachat_chat_transformation.py | ||