[GH-ISSUE #12441] Updated to 0.12.3 and /v1/embedding API has odd error #8264

Closed
opened 2026-04-12 20:48:04 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @heapsoftware on GitHub (Sep 29, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/12441

What is the issue?

Hi guys!

Thanks for this fantastic tool. Been using embeddings with https://github.com/Cinnamon/kotaemon and since the update maybe within the last two versions or so, all of a sudden all embedding calls stopped working. It was working without issue before but now comes up with the following error, can this be fixed on your side?

INFO:httpx:HTTP Request: POST http://IPADDRESS:11434/v1/embeddings "HTTP/1.1 400 Bad Request"
Error code: 400 - {'error': {'message': 'invalid input type', 'type': 'api_error', 'param': None, 'code': None}}

Relevant log output


OS

Docker

GPU

Nvidia

CPU

AMD

Ollama version

0.12.3

Originally created by @heapsoftware on GitHub (Sep 29, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/12441 ### What is the issue? Hi guys! Thanks for this fantastic tool. Been using embeddings with https://github.com/Cinnamon/kotaemon and since the update maybe within the last two versions or so, all of a sudden all embedding calls stopped working. It was working without issue before but now comes up with the following error, can this be fixed on your side? INFO:httpx:HTTP Request: POST http://IPADDRESS:11434/v1/embeddings "HTTP/1.1 400 Bad Request" Error code: 400 - {'error': {'message': 'invalid input type', 'type': 'api_error', 'param': None, 'code': None}} ### Relevant log output ```shell ``` ### OS Docker ### GPU Nvidia ### CPU AMD ### Ollama version 0.12.3
GiteaMirror added the bug label 2026-04-12 20:48:04 -05:00
Author
Owner

@heapsoftware commented on GitHub (Sep 29, 2025):

I figured it out, it was due to the context_length param which is not supported per the ollama API doc.

<!-- gh-comment-id:3344520887 --> @heapsoftware commented on GitHub (Sep 29, 2025): I figured it out, it was due to the context_length param which is not supported per the ollama API doc.
Author
Owner

@pdevine commented on GitHub (Sep 29, 2025):

@heapsoftware where were you passing the context_length parameter? I've been trying to duplicate the bug but haven't been able to so far.

<!-- gh-comment-id:3344530287 --> @pdevine commented on GitHub (Sep 29, 2025): @heapsoftware where were you passing the `context_length` parameter? I've been trying to duplicate the bug but haven't been able to so far.
Author
Owner

@heapsoftware commented on GitHub (Sep 29, 2025):

I get the error when I put the context_length parameter in kotaemon a like this below in Embedding settings, save and then click the Test button. I didnt do anything to get any of the traffic and/or post data it sending to the API endpoint, so not sure what its sending when I add that in, but I remove it and it works now.
Specification of the Embedding model in YAML format:
api_key: ollama
base_url: http://OLLAMAIP:11434/v1/
context_length: 512
model: mxbai-embed-large:latest

<!-- gh-comment-id:3344726131 --> @heapsoftware commented on GitHub (Sep 29, 2025): I get the error when I put the context_length parameter in kotaemon a like this below in Embedding settings, save and then click the Test button. I didnt do anything to get any of the traffic and/or post data it sending to the API endpoint, so not sure what its sending when I add that in, but I remove it and it works now. Specification of the Embedding model in YAML format: api_key: ollama base_url: http://OLLAMAIP:11434/v1/ context_length: 512 model: mxbai-embed-large:latest
Author
Owner

@yfxu-zz commented on GitHub (Sep 29, 2025):

unsubscribe

At 2025-09-29 11:33:01, "heapsoftware" @.***> wrote:

heapsoftware left a comment (ollama/ollama#12441)

I get the error when I put the context_length parameter in kotaemon a like this below in Embedding settings, save and then click the Test button. I didnt do anything to get any of the traffic and/or post data it sending to the API endpoint, so not sure what its sending when I add that in, but I remove it and it works now.
Specification of the Embedding model in YAML format:
api_key: ollama
base_url: http://OLLAMAIP:11434/v1/
context_length: 512
model: mxbai-embed-large:latest


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: @.***>

<!-- gh-comment-id:3345152970 --> @yfxu-zz commented on GitHub (Sep 29, 2025): unsubscribe At 2025-09-29 11:33:01, "heapsoftware" ***@***.***> wrote: heapsoftware left a comment (ollama/ollama#12441) I get the error when I put the context_length parameter in kotaemon a like this below in Embedding settings, save and then click the Test button. I didnt do anything to get any of the traffic and/or post data it sending to the API endpoint, so not sure what its sending when I add that in, but I remove it and it works now. Specification of the Embedding model in YAML format: api_key: ollama base_url: http://OLLAMAIP:11434/v1/ context_length: 512 model: mxbai-embed-large:latest — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#8264