A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 14, 05:30 UTC
fix: OpenAI SDK compat (ResponseTextConfig) (#23126)
Signed-off-by: breno.skuk <breno.skuk@hcompany.ai> Signed-off-by: Breno Baldas Skuk <breno.skuk@hcompany.ai> Signed-off-by: mgoin <mgoin64@gmail.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Michael Goin <mgoin64@gmail.com>
Breno Baldas Skuk committed
Aug 19, 2025 at 00:22 UTC
ac6eb49de38978336104f18f0349e072a442e054
3 files changed
+11
-3
requirements/common.txt
+1
-1
@@ -12,7 +12,7 @@ tokenizers >= 0.21.1 # Required for fast incremental detokenization.
12
protobuf # Required by LlamaTokenizer.
13
fastapi[standard] >= 0.115.0 # Required by FastAPI's form models in the OpenAI API server's audio transcriptions endpoint.
14
aiohttp
15
-openai >= 1.99.1, < 1.100.0 # For Responses API with reasoning content
15
+openai >= 1.99.1 # For Responses API with reasoning content
16
pydantic >= 2.10
17
prometheus_client >= 0.18.0
18
pillow # Required for image processing
requirements/docs.txt
+1
-1
@@ -18,7 +18,7 @@ cbor2
18
cloudpickle
19
fastapi
20
msgspec
21
-openai < 1.100.0
21
+openai
22
openai-harmony
23
partial-json-parser
24
pillow
vllm/entrypoints/openai/protocol.py
+9
-1
@@ -20,7 +20,15 @@ from openai.types.chat.chat_completion_message import (
20
from openai.types.responses import (ResponseFunctionToolCall,
21
ResponseInputItemParam, ResponseOutputItem,
22
ResponsePrompt, ResponseReasoningItem,
23
- ResponseStatus, ResponseTextConfig)
23
+ ResponseStatus)
24
+
25
+# Backward compatibility for OpenAI client versions
26
+try: # For older openai versions (< 1.100.0)
27
+ from openai.types.responses import ResponseTextConfig
28
+except ImportError: # For newer openai versions (>= 1.100.0)
29
+ from openai.types.responses import (ResponseFormatTextConfig as
30
+ ResponseTextConfig)
31
+
32
from openai.types.responses.response import ToolChoice
33
from openai.types.responses.tool import Tool
34
from openai.types.shared import Metadata, Reasoning