Skip to content

Fix: Ollama integration KeyError when using JSON response format #10611

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 7, 2025

Conversation

aravindkarnam
Copy link
Contributor

Title

Fix: Ollama integration fails with KeyError when using JSON response format

Relevant issues

#10589

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

Type

🐛 Bug Fix

Changes

In litellm/llms/ollama/completion/transformation.py check the structure of the JSON response before trying to process it as a function call.

Copy link

vercel bot commented May 7, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
litellm ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 7, 2025 4:37am

@CLAassistant
Copy link

CLAassistant commented May 7, 2025

CLA assistant check
All committers have signed the CLA.

@krrishdholakia krrishdholakia merged commit 4f162b0 into BerriAI:main May 7, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants