cant support deepseek-ocr model #307

Open
opened 2026-02-15 16:29:49 -05:00 by yindo · 1 comment
Owner

Originally created by @justwangweimin on GitHub (Dec 10, 2025).

直接调用,不设置超时和复杂选项

    response = ollama.generate(
        model="deepseek-ocr",
        prompt="extract the text",
        images=[img_data]
    )

the program will hung in this place

ollama can support deepseek-ocr,
but ollama-python can't support deepseek-ocr?

Originally created by @justwangweimin on GitHub (Dec 10, 2025). # 直接调用,不设置超时和复杂选项 response = ollama.generate( model="deepseek-ocr", prompt="extract the text", images=[img_data] ) the program will hung in this place ollama can support deepseek-ocr, but ollama-python can't support deepseek-ocr?
Author
Owner

@darth-raijin commented on GitHub (Dec 17, 2025):

I managed to reproduce this and it looks prompt-dependent.

I tested it two ways:

  • Python script using ollama-python
  • Querying the Ollama server directly via HTTP (Bruno)

So it doesn’t seem client-specific, as I could consistently cause "hangs" for both entrypoints.

What am I seeing?

  • Hangs: extract the text
  • Works: extract the text. (same prompt, just with a trailing period)

This also happens when calling the server directly, so my guess is the issue is in the Ollama server / model behavior rather than the Python client.

I haven’t dug deeper yet, but it doesn’t feel like intended behavior. Could you confirm if it works by adding a period at the end of your prompt?

A reasonable next step might be to add a small integration test on the server side that calls /api/generate to see if the behaviour can be reproduced in automated tests too

Ollama server version: 0.13.4
Ollama python version: 0.6.1

@darth-raijin commented on GitHub (Dec 17, 2025): I managed to reproduce this and it looks *prompt-dependent*. I tested it two ways: - Python script using `ollama-python` - Querying the Ollama server directly via HTTP ([Bruno](https://github.com/usebruno/bruno)) So it doesn’t seem client-specific, as I could consistently cause "hangs" for both entrypoints. What am I seeing? - **Hangs:** `extract the text` - **Works:** `extract the text.` (same prompt, just with a trailing period) This also happens when calling the server directly, so my guess is the issue is in the Ollama server / model behavior rather than the Python client. I haven’t dug deeper yet, but it doesn’t feel like intended behavior. Could you confirm if it works by adding a period at the end of your prompt? A reasonable next step might be to add a small integration test on the server side that calls `/api/generate` to see if the behaviour can be reproduced in automated tests too Ollama server version: 0.13.4 Ollama python version: 0.6.1
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ollama/ollama-python#307