ragflow icon indicating copy to clipboard operation
ragflow copied to clipboard

[Bug]: cant add vision model through openai-v0.22.1-39-g4d869862

Open Zvezda117 opened this issue 1 month ago • 4 comments

Self Checks

  • [x] I have searched for existing issues search for existing issues, including closed ones.
  • [x] I confirm that I am using English to submit this report (Language Policy).
  • [x] Non-english title submitions will be closed directly ( 非英文标题的提交将会被直接关闭 ) (Language Policy).
  • [x] Please do not modify this template :) and fill in all the required fields.

RAGFlow workspace code commit ID

4d869862

RAGFlow image version

v0.22.1-39-g4d869862

Other environment information

Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz x2
RTX4090 x2
Ubuntu24.04LTS
256GB RAM

Actual behavior

Image

Expected behavior

able to add vision model

Steps to reproduce

add models trough openai-compatiable with mirror sites with vision option

Additional information

No response

Zvezda117 avatar Nov 24 '25 12:11 Zvezda117

The error happens because the vision model implementation in RAGFlow (specifically, the GptV4.describe() method, which is inherited by OpenAI_APICV) calls the OpenAI Python client's Completions.create() with an unsupported argument: unused=None. The OpenAI client does not accept this keyword, which causes the failure when adding vision models via the OpenAI-compatible interface. Removing the unused argument from the Completions.create() call in rag/llm/cv_model.py should resolve the issue for vision model integration through this API interface.
See code reference

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

dosubot[bot] avatar Nov 24 '25 12:11 dosubot[bot]

+1 -- having same issue.

lweighall avatar Nov 26 '25 19:11 lweighall

Same with vLLM and SGLang through both OpenAI-compatible and vLLM interface

mratsim avatar Nov 27 '25 10:11 mratsim

After updating the code, the problem persists

darvec112357 avatar Dec 09 '25 02:12 darvec112357

met too

ouyong-1 avatar Dec 14 '25 06:12 ouyong-1