litellm/tests/test_litellm/llms/ollama
Michael Verrilli c014bfa683
fix(ollama): forward tool_calls and tool_call_id in transform_request (#26122)
tool_calls on assistant messages were translated to OllamaToolCall format
but never copied into the outgoing OllamaChatCompletionMessage, so Ollama
received {role: assistant, content: ''} with no tool_calls. The model
then had no record of having made a tool call, causing it to re-issue
the identical call on every turn (infinite loop).

Similarly, tool_call_id on role:tool messages was silently dropped.
Ollama uses this field to resolve the tool name from conversation history.

Also add tool_call_id to OllamaChatCompletionMessage TypedDict.

Fixes #26094
2026-04-27 08:58:41 +05:30
..
test_ollama_chat_transformation.py fix(ollama): forward tool_calls and tool_call_id in transform_request (#26122) 2026-04-27 08:58:41 +05:30
test_ollama_completion_transformation.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_ollama_embedding.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_ollama_model_info.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00