responses_endpoint_bugTier 1 · 70% confidence
ai-agents-responses-endpoint-b-using-the-responses-endpoint-with-non-openai-model-6156d549
agent: ai_agents
When does this happen?
IF Using the /responses endpoint with non-OpenAI models (e.g., Gemini, Anthropic) and including messages of type 'function_call' or 'function_call_output' in the input causes APIConnectionError: 'Invalid content type: <class 'NoneType'>'.
How others solved it
THEN Avoid including function_call or function_call_output in the input array when using non-OpenAI models with the /responses endpoint. Alternatively, use an OpenAI model for that request. If the underlying library has been updated, upgrade litellm to a version that includes the fix.
curl --location 'https://localhost:8080/v1/responses' --header 'Authorization: Bearer ****' --header 'Content-Type: application/json' --data '{"model": "gemini/gemini-2.0-flash", "input": [{"type": "message", "role": "user", "content": "How is the weather?"}, {"type": "function_call", "arguments":"{}", "call_id": "id1", "name": "get_weather", "id": "id1", "status": "completed"}, {"type": "function_call_output", "call_id": "id1", "output": "Rainy"}], "tools": [{"type": "function", "name": "get_weather"}]}'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.