Hello,
I am using OpenAI-compatible API with the endpoint set to [LocalUrl]/v1. My application is running and connecting to Ollama, and it can successfully receive requests from Mattermost. However, I am not receiving the expected response back.
The backend server sends the following response:
{ "id": "bbf9c726-fa1a-4fdf-9320-be7c37ed2e09", "object": "chat.completion", "created": 1755133389, "model": "llama3.1", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "Hello! This is a test" }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 100, "completion_tokens": 1000, "total_tokens": 1100 } }
However, I am encountering the following error message:
{ "caller": "app/plugin_api.go:980", "error": "error, status code: 406, message: invalid character ‘<’ looking for beginning of value", "level": "error", "msg": "Streaming result to post failed partway", "plugin_id": "mattermost-ai", "timestamp": "2025-08-13 21:02:31.253 -04:00" }
Can someone help me understand why the response is not being processed correctly and explain what this error message indicates?