[GH-ISSUE #12859] Persistent 500 Internal Server Error with qwen3-vl:235b-cloud via OpenAI Interface #8523

Open
opened 2026-04-12 21:13:07 -05:00 by GiteaMirror · 8 comments
Owner

Originally created by @jsmith173 on GitHub (Oct 30, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/12859

What is the issue?

Dear Ollama Support,

I'm currently using the qwen3-vl:235b-cloud model for image recognition through the OpenAI-compatible Python interface. Until recently, everything worked smoothly. However, I'm now consistently receiving the following error:

Internal server error, status code: 500

I have a valid Ollama web serial key, and I've checked both my hourly and weekly usage limits — nothing appears to be expired or exceeded.

Relevant log output


OS

No response

GPU

No response

CPU

No response

Ollama version

No response

Originally created by @jsmith173 on GitHub (Oct 30, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/12859 ### What is the issue? Dear Ollama Support, I'm currently using the `qwen3-vl:235b-cloud` model for image recognition through the OpenAI-compatible Python interface. Until recently, everything worked smoothly. However, I'm now consistently receiving the following error: ``` Internal server error, status code: 500 ``` I have a valid Ollama web serial key, and I've checked both my hourly and weekly usage limits — nothing appears to be expired or exceeded. ### Relevant log output ```shell ``` ### OS _No response_ ### GPU _No response_ ### CPU _No response_ ### Ollama version _No response_
GiteaMirror added the cloudbug labels 2026-04-12 21:13:07 -05:00
Author
Owner

@rick-github commented on GitHub (Oct 30, 2025):

Do you get an error when you use the CLI?

$ ollama run qwen3-vl:235b-cloud describe this picture: ./picture.png 
Added image './picture.png'
Thinking...
Got it, let's describe this picture. First, there's a small white puppy 
...

<!-- gh-comment-id:3467870426 --> @rick-github commented on GitHub (Oct 30, 2025): Do you get an error when you use the CLI? ```console $ ollama run qwen3-vl:235b-cloud describe this picture: ./picture.png Added image './picture.png' Thinking... Got it, let's describe this picture. First, there's a small white puppy ... ```
Author
Owner

@asitwere commented on GitHub (Oct 30, 2025):

Same with the local variants of 235B VL (#12845)

<!-- gh-comment-id:3467873538 --> @asitwere commented on GitHub (Oct 30, 2025): Same with the local variants of 235B VL ([#12845](https://github.com/ollama/ollama/issues/12845))
Author
Owner

@jsmith173 commented on GitHub (Oct 30, 2025):

This works
ollama run qwen3-vl:235b-cloud describe this picture: ./circuit.jpg

Python OpenAI code not works:
(worked on the previous week)

api_key = self.config['api_key']
base_url = self.config['base_url']
client = OpenAI(
api_key=api_key,
base_url=base_url
)

with open(image_path, "rb") as image_file:
b64_image = base64.b64encode(image_file.read()).decode("utf-8")

pic_ext = get_extension(image_path)
if pic_ext == "jpg":
pic_ext = "jpeg"

prompt = self.config['instructions']
model = self.config['model']
max_tokens = 10000
stream = self.config['streaming'] == 1

response = client.chat.completions.create(
model=model,
messages=[
{
"role": "user",
"content": [
{"type": "text", "text": prompt},
{
"type": "image_url",
"image_url": {
"url": f"data:image/{pic_ext};base64,{b64_image}"
}
}
]
}
],

stream=stream,
n=1,

frequency_penalty=0,
presence_penalty=0,
seed=12345,
top_p=0.1,
max_tokens=max_tokens

)

<!-- gh-comment-id:3467971727 --> @jsmith173 commented on GitHub (Oct 30, 2025): This works ollama run qwen3-vl:235b-cloud describe this picture: ./circuit.jpg Python OpenAI code not works: (worked on the previous week) api_key = self.config['api_key'] base_url = self.config['base_url'] client = OpenAI( api_key=api_key, base_url=base_url ) with open(image_path, "rb") as image_file: b64_image = base64.b64encode(image_file.read()).decode("utf-8") pic_ext = get_extension(image_path) if pic_ext == "jpg": pic_ext = "jpeg" prompt = self.config['instructions'] model = self.config['model'] max_tokens = 10000 stream = self.config['streaming'] == 1 response = client.chat.completions.create( model=model, messages=[ { "role": "user", "content": [ {"type": "text", "text": prompt}, { "type": "image_url", "image_url": { "url": f"data:image/{pic_ext};base64,{b64_image}" } } ] } ], stream=stream, n=1, frequency_penalty=0, presence_penalty=0, seed=12345, top_p=0.1, max_tokens=max_tokens )
Author
Owner

@rick-github commented on GitHub (Oct 30, 2025):

#!/usr/bin/env python3

import os
import base64
from openai import OpenAI

def get_extension(path):
  return path[path.rindex(".")+1:]

class Test():
  config = {
    "api_key": os.getenv("OLLAMA_API_KEY"),
    "base_url": "http://localhost:11434/v1",
    "model": "qwen3-vl:235b-cloud",
    "instructions": "describe this image",
    "streaming": 1,
  }
  
  def doit(self, image_path):
    api_key = self.config['api_key']
    base_url = self.config['base_url']
    client = OpenAI(
      api_key=api_key,
      base_url=base_url
    )
    with open(image_path, "rb") as image_file:
      b64_image = base64.b64encode(image_file.read()).decode("utf-8")

    pic_ext = get_extension(image_path)
    if pic_ext == "jpg":
      pic_ext = "jpeg"

    prompt = self.config['instructions']
    model = self.config['model']
    max_tokens = 10000
    stream = self.config['streaming'] == 1

    response = client.chat.completions.create(
      model=model,
      messages=[
        {
          "role": "user",
          "content": [
            { "type": "text", "text": prompt},
            { "type": "image_url", "image_url": {
                "url": f"data:image/{pic_ext};base64,{b64_image}"
              }
            }
          ]
        }
      ],

      stream=stream,
      n=1,
      frequency_penalty=0,
      presence_penalty=0,
      seed=12345,
      top_p=0.1,
      max_tokens=max_tokens
    )

    reasoning = False
    for r in response:
      if hasattr(r.choices[0].delta, "reasoning"):
        if not reasoning:
          reasoning = True
          print("Thinking...")
        print(r.choices[0].delta.reasoning, end='')
        continue
      if reasoning:
        reasoning = False
        print("\n...done")
      print(r.choices[0].delta.content, end='')
    print()

Test().doit("./picture.jpg")
Thinking...
So, let's describe this image. First, there's a small white puppy sitting on a stone step. The puppy has fluffy fur, a round face, and dark eyes. It's wearing a red collar with a gold bell attached. The background is blurred, so the focus is on the puppy. The step looks like it's made of concrete or stone, with some texture. The puppy is looking to the right, maybe curious. The overall scene is calm, with the puppy being the main subject. Let me check the details: the collar is red, the bell is gold, the puppy's fur is white and soft. The background has a dark area and maybe a wooden or brown structure, but it's out of focus. The lighting is natural, so it's probably outdoors. Need to make sure all elements are covered: the puppy's position, color, accessories, the step, and the background.
...done


The image features a small, fluffy white puppy sitting on a weathered stone step. The puppy has a round face, dark expressive eyes, and a short snout, with its gaze directed to the right, giving it a curious or attentive appearance. Around its neck, it wears a **red collar** adorned with a **gold bell** that hangs prominently.  

The stone step beneath the puppy has a textured, slightly worn surface with visible patches of discoloration, suggesting age or exposure to the elements. The background is softly blurred, featuring muted tones of brown and dark red, which helps keep the focus sharply on the puppy. The lighting appears natural, likely from daylight, highlighting the puppy’s soft, white fur and creating a gentle, warm atmosphere.  

Overall, the scene conveys a sense of innocence and charm, with the puppy as the clear focal point against the understated, out-of-focus backdrop.
<!-- gh-comment-id:3468761613 --> @rick-github commented on GitHub (Oct 30, 2025): ```python #!/usr/bin/env python3 import os import base64 from openai import OpenAI def get_extension(path): return path[path.rindex(".")+1:] class Test(): config = { "api_key": os.getenv("OLLAMA_API_KEY"), "base_url": "http://localhost:11434/v1", "model": "qwen3-vl:235b-cloud", "instructions": "describe this image", "streaming": 1, } def doit(self, image_path): api_key = self.config['api_key'] base_url = self.config['base_url'] client = OpenAI( api_key=api_key, base_url=base_url ) with open(image_path, "rb") as image_file: b64_image = base64.b64encode(image_file.read()).decode("utf-8") pic_ext = get_extension(image_path) if pic_ext == "jpg": pic_ext = "jpeg" prompt = self.config['instructions'] model = self.config['model'] max_tokens = 10000 stream = self.config['streaming'] == 1 response = client.chat.completions.create( model=model, messages=[ { "role": "user", "content": [ { "type": "text", "text": prompt}, { "type": "image_url", "image_url": { "url": f"data:image/{pic_ext};base64,{b64_image}" } } ] } ], stream=stream, n=1, frequency_penalty=0, presence_penalty=0, seed=12345, top_p=0.1, max_tokens=max_tokens ) reasoning = False for r in response: if hasattr(r.choices[0].delta, "reasoning"): if not reasoning: reasoning = True print("Thinking...") print(r.choices[0].delta.reasoning, end='') continue if reasoning: reasoning = False print("\n...done") print(r.choices[0].delta.content, end='') print() Test().doit("./picture.jpg") ``` ```console Thinking... So, let's describe this image. First, there's a small white puppy sitting on a stone step. The puppy has fluffy fur, a round face, and dark eyes. It's wearing a red collar with a gold bell attached. The background is blurred, so the focus is on the puppy. The step looks like it's made of concrete or stone, with some texture. The puppy is looking to the right, maybe curious. The overall scene is calm, with the puppy being the main subject. Let me check the details: the collar is red, the bell is gold, the puppy's fur is white and soft. The background has a dark area and maybe a wooden or brown structure, but it's out of focus. The lighting is natural, so it's probably outdoors. Need to make sure all elements are covered: the puppy's position, color, accessories, the step, and the background. ...done The image features a small, fluffy white puppy sitting on a weathered stone step. The puppy has a round face, dark expressive eyes, and a short snout, with its gaze directed to the right, giving it a curious or attentive appearance. Around its neck, it wears a **red collar** adorned with a **gold bell** that hangs prominently. The stone step beneath the puppy has a textured, slightly worn surface with visible patches of discoloration, suggesting age or exposure to the elements. The background is softly blurred, featuring muted tones of brown and dark red, which helps keep the focus sharply on the puppy. The lighting appears natural, likely from daylight, highlighting the puppy’s soft, white fur and creating a gentle, warm atmosphere. Overall, the scene conveys a sense of innocence and charm, with the puppy as the clear focal point against the understated, out-of-focus backdrop. ```
Author
Owner

@jsmith173 commented on GitHub (Oct 30, 2025):

base_url should be 'https://ollama.com/v1'
Your program runs local.
https://ollama.com/blog/qwen3-vl
Also I think I can not run local.

<!-- gh-comment-id:3469542757 --> @jsmith173 commented on GitHub (Oct 30, 2025): base_url should be 'https://ollama.com/v1' Your program runs local. https://ollama.com/blog/qwen3-vl Also I think I can not run local.
Author
Owner

@rick-github commented on GitHub (Oct 30, 2025):

$ diff -u ./12850.py.orig 12850.py
--- ./12850.py.orig     2025-10-30 19:50:48.626631237 +0100
+++ 12850.py    2025-10-30 19:52:35.652897651 +0100
@@ -10,7 +10,7 @@
 class Test():
   config = {
     "api_key": os.getenv("OLLAMA_API_KEY"),
-    "base_url": "http://localhost:11434/v1",
+    "base_url": "https://ollama.com/v1",
     "model": "qwen3-vl:235b-cloud",
     "instructions": "describe this image",
     "streaming": 1,
$ ./12850.py
Thinking...
So, let's describe this image. First, there's a small white puppy sitting on a stone step. The puppy has fluffy fur, a round face, and dark eyes. It's wearing a red collar with a gold bell attached. The background is blurred, so the focus is on the puppy. The step looks like it's made of concrete or stone, with some texture. The puppy is looking to the right, maybe curious. The overall scene is calm, with the puppy being the main subject. Let me check the details: white fur, red collar, bell, sitting on a step, blurred background. Yep, that's the key info.
...done


The image features a small, fluffy white puppy sitting on a weathered stone step. The puppy has a round face, dark expressive eyes, and a short snout. It wears a bright red collar adorned with a small, shiny gold bell. The puppy is positioned in profile, gazing to the right with a curious or attentive expression. The background is softly blurred, emphasizing the puppy as the focal point, while the stone step beneath it shows subtle texture and signs of wear. The overall mood is gentle and endearing, highlighting the puppy’s innocence and charm.
<!-- gh-comment-id:3469598334 --> @rick-github commented on GitHub (Oct 30, 2025): ```diff $ diff -u ./12850.py.orig 12850.py --- ./12850.py.orig 2025-10-30 19:50:48.626631237 +0100 +++ 12850.py 2025-10-30 19:52:35.652897651 +0100 @@ -10,7 +10,7 @@ class Test(): config = { "api_key": os.getenv("OLLAMA_API_KEY"), - "base_url": "http://localhost:11434/v1", + "base_url": "https://ollama.com/v1", "model": "qwen3-vl:235b-cloud", "instructions": "describe this image", "streaming": 1, ``` ```console $ ./12850.py Thinking... So, let's describe this image. First, there's a small white puppy sitting on a stone step. The puppy has fluffy fur, a round face, and dark eyes. It's wearing a red collar with a gold bell attached. The background is blurred, so the focus is on the puppy. The step looks like it's made of concrete or stone, with some texture. The puppy is looking to the right, maybe curious. The overall scene is calm, with the puppy being the main subject. Let me check the details: white fur, red collar, bell, sitting on a step, blurred background. Yep, that's the key info. ...done The image features a small, fluffy white puppy sitting on a weathered stone step. The puppy has a round face, dark expressive eyes, and a short snout. It wears a bright red collar adorned with a small, shiny gold bell. The puppy is positioned in profile, gazing to the right with a curious or attentive expression. The background is softly blurred, emphasizing the puppy as the focal point, while the stone step beneath it shows subtle texture and signs of wear. The overall mood is gentle and endearing, highlighting the puppy’s innocence and charm. ```
Author
Owner

@jsmith173 commented on GitHub (Oct 30, 2025):

At this moment, my original program is working again, although it's not as fast as it used to be.
Perhaps you've changed something, or the server load is different now.
I'll check again tomorrow to see how it performs.

Note:
My prompt size is 3 kB, and the image size is 30 kB.

<!-- gh-comment-id:3469715370 --> @jsmith173 commented on GitHub (Oct 30, 2025): At this moment, my original program is working again, although it's not as fast as it used to be. Perhaps you've changed something, or the server load is different now. I'll check again tomorrow to see how it performs. **Note:** My prompt size is 3 kB, and the image size is 30 kB.
Author
Owner

@jsmith173 commented on GitHub (Oct 31, 2025):

At this moment, neither my original program nor your program works with my prompt (approximately 3kB in size). However, your original program with the short prompt does work correctly.

<!-- gh-comment-id:3471369991 --> @jsmith173 commented on GitHub (Oct 31, 2025): At this moment, neither my original program nor your program works with my prompt (approximately 3kB in size). However, your original program with the short prompt does work correctly.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#8523