-
Notifications
You must be signed in to change notification settings - Fork 864
Description
Hello there!
Not quite sure if it's relevant to ollama/ollama#11704 or is it a separate thing.
I have updated to the latest version of ollama (which is 0.11.4 as of now). I'm using an official ollama python library (0.5.3) and still constantly getting 500 errors with gpt-oss:20b
unexpected error format in response (status code: 500)
Traceback (most recent call last):
File "/home/user/test_agent/benchmark.py", line 479, in wrapper
result = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/home/user/test_agent/agent.py", line 581, in llm_process_question
response = OllamaClient.chat(model=model_name, messages=messages)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/miniconda3/envs/test_ollama/lib/python3.12/site-packages/ollama/_client.py", line 342, in chat
return self._request(
^^^^^^^^^^^^^^
File "/home/user/miniconda3/envs/test_ollama/lib/python3.12/site-packages/ollama/_client.py", line 180, in _request
return cls(**self._request_raw(*args, **kwargs).json())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/miniconda3/envs/test_ollama/lib/python3.12/site-packages/ollama/_client.py", line 124, in _request_raw
raise ResponseError(e.response.text, e.response.status_code) from None
ollama._types.ResponseError: unexpected error format in response (status code: 500)
I'm not using any tools - just plain chat calls like res = OllamaClient.chat(model=model_name, messages=messages) and some custom scaffolding around it. I even tested it with overriding the default three-pages-long TEMPLATE with my much more simpler version of TEMPLATE, inherited from simpler models like qwen2.5. With that template gpt-oss:20b acts much more stable, but still prone to 500 time to time.
Is it ollama or ollama python client here who tries (and fails) to parse the output from a model?