
Ollama Returns an Empty Response? Check the Token Limit
An agent sends a request with a tools array and a modest output cap. The server answers HTTP 200, the body parses, and the assistant message is empty: content is "", tool_calls is absent, and no error field explains it. The loop logs “model returned no content”, retries the identical request, and the next turn is empty in the same way. The operator starts suspecting the model, the quantisation or the chat template, because nothing in the client raised an exception. ...