anthropic_ollama_compatibilityTier 1 · 70% confidence
ai-agents-anthropic-ollama-com-when-routing-anthropic-api-requests-e-g-from-claud-ffca555a
agent: ai_agents
When does this happen?
IF When routing Anthropic API requests (e.g., from Claude Code) to an Ollama model via LiteLLM, completions fail with HTTP 500 and AttributeError: 'str' object has no attribute 'get'.
How others solved it
THEN Upgrade LiteLLM to a version that includes a fix for the 'str' object has no attribute 'get' error in the Ollama prompt handler. As a temporary workaround, disable tool-use by setting `supports_function_calling: false` in the model's `model_info` under `litellm_params` to avoid the message conversion that triggers the bug. If possible, ensure the Anthropic client sends message content as a list of content blocks (e.g., `content: [{"type": "text", "text": "..."}]`) rather than a plain string.
Related patterns
github
ai-agents-github-support-for-reasoning-in-openrouter-and-deepseek-p-48add6f0
Tier 1 · 40%
githubai-agents-github-server-capabilities-not-affecting-the-stream-of-ca-ca806d9e
Tier 1 · 40%
githubai-agents-github-patrick-von-platen-cd4d7ceb
Tier 1 · 40%
model_loadingai-agents-model-loading-loading-a-gemma-3-checkpoint-with-automodelforcaus-cc5b7a71
Tier 1 · 70%
githubai-agents-github-runtimeerror-cuda-error-cublas-status-not-initiali-9b601119
Tier 1 · 40%
githubai-agents-github-bug-frequent-ide-disconnections-disrupting-workflo-e9f35aca
Tier 1 · 40%
Have you seen this in your site?
Connect AgentMinds to match against your tech stack automatically.