Describe the bug
The content-type header returned on the /v1/chat/completions route is text/html; charset=utf-8 instead of application/json, which causes errors when using clients that use the header to decode responses.
To Reproduce
Steps to reproduce the behavior:
Load a model into nitro, any model will do
Hit the route with curl: curl -vv -s http://localhost:3928/v1/chat/completions -H 'content-type: application/json' -d '{"messages":[{"role":"user","content":"Whatever"}]}'
See the incorrect content-type
Expected behavior
The content-type header in the http response should be application/json.
Describe the bug The
content-type
header returned on the /v1/chat/completions route istext/html; charset=utf-8
instead ofapplication/json
, which causes errors when using clients that use the header to decode responses.To Reproduce Steps to reproduce the behavior:
curl -vv -s http://localhost:3928/v1/chat/completions -H 'content-type: application/json' -d '{"messages":[{"role":"user","content":"Whatever"}]}'
content-type
Expected behavior The
content-type
header in the http response should beapplication/json
.Additional context
output: