Skip to content

Commit abfe551

Browse files
chore: apply Gemini review
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent f8c6f64 commit abfe551

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/vllm_router/utils.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class ModelType(enum.Enum):
7777
@staticmethod
7878
def get_url(model_type: str):
7979
match ModelType[model_type]:
80-
case ModelType.chat:
80+
case ModelType.chat | ModelType.vision:
8181
return "/v1/chat/completions"
8282
case ModelType.completion:
8383
return "/v1/completions"
@@ -89,8 +89,6 @@ def get_url(model_type: str):
8989
return "/v1/score"
9090
case ModelType.transcription:
9191
return "/v1/audio/transcriptions"
92-
case ModelType.vision:
93-
return "/v1/chat/completions"
9492

9593
@staticmethod
9694
def get_test_payload(model_type: str):
@@ -233,7 +231,7 @@ def is_model_healthy(url: str, model: str, model_type: str) -> bool:
233231
# we will use pre-generated silent wav bytes
234232
response = requests.post(
235233
f"{url}{model_url}",
236-
files=ModelType[model_type].get_test_payload(
234+
files=ModelType.get_test_payload(
237235
model_type
238236
), # multipart/form-data
239237
data={"model": model},
@@ -245,7 +243,7 @@ def is_model_healthy(url: str, model: str, model_type: str) -> bool:
245243
f"{url}{model_url}",
246244
headers={"Content-Type": "application/json"},
247245
json={"model": model}
248-
| ModelType[model_type].get_test_payload(model_type),
246+
| ModelType.get_test_payload(model_type),
249247
timeout=10,
250248
)
251249

0 commit comments

Comments
 (0)