ollama: attaching a file does not work/results in error 500/400 Bad request
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript, ollama
Research direction
Start with the OllamaProvider path used by the --serve web UI and inspect the POST request to /v1/chat/completions shown in the logs. Reproduce with a text, shell, or Python attachment and compare the file content payload with Ollama's accepted format. Done means the attached document is summarized without the provider returning HTTP 400 or the server returning HTTP 500.
Written by the indexing model from the issue text.
Description
Steps to reproduce:
llms --serve 8080 --verbose, access web UI- select ollama provider (tested with multiple models)
- attach a file (tested with multiple text files/shell/python scripts) with a promt su chas
Please summarize this documentand submit the query - the web UI displays an error and not response is returned
HTTP 500 Internal Server Error
{
"error": "HTTP 400 Bad Request"
}
Logs:
provider: ollama OllamaProvider
POST http://localhost:11434/v1/chat/completions
{
"model": "deepseek-r1:14b",
"messages": [
{
"role": "user",
"content": [
{
"type": "file",
"file": {
"filename": "test.xml",
"file_data": "data:text/xml;base64,(1325)"
}
},
{
"type": "text",
"text": "Summarize the file\n\n[\ud83d\udcce test.xml]"
}
]
}
],
"enable_thinking": true,
"metadata": {
"threadId": "1765739448549"
},
"stream": false
}
Provider ollama failed: HTTP 400 Bad Request
- Dominant language
- JavaScript
- Stars
- 629
- Forks
- 31
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ServiceStack/llms
-
Error adding custom provider (perplexity) "unsupported operand type(s) for +=: 'int' and 'str'" Open
Difficulty 3/5 1-2 days Newbie friendliness 52/100
ServiceStack/llms#42 · 3 comments ·
-
Support Windows Openenhancement help wanted
Difficulty 5/5 Over a week Newbie friendliness 25/100
ServiceStack/llms#28 · 2 reactions ·
-
Google OAuth Openenhancement help wanted
Difficulty 5/5 Over a week Newbie friendliness 25/100
ServiceStack/llms#15 · 11 comments ·
-
ServiceStack/llms#2 · 2 comments · 1 assignee ·
All issues in ServiceStack/llms
Similar issues
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
optimization optimization:agents-md-curator
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
githubnext/gh-aw-cao#13143 ·
-
status: needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100