[Cohere] Bound remaining request priorities to the MessagePack int64 range (#56146)
Signed-off-by: Taneem Ibrahim <taneem.ibrahim@gmail.com>
Taneem Ibrahim committed
Sep 9, 2026 at 17:57 UTC
4ebf61ebda8dc8bf090bd4ee14d2855f694111b0
3 files changed
+4
-2
vllm/entrypoints/cohere/protocol.py
+1
-1
@@ -170,7 +170,7 @@ class CohereChatV2Request(BaseModel):
170
thinking: Thinking | None = None
171
172
# Scheduling
173
- priority: int | None = None
173
+ priority: int | None = Field(default=None, ge=-(2**63), le=2**63 - 1)
174
175
# vLLM-specific extensions (not in Cohere spec). These mirror what the
176
# Anthropic and OpenAI surfaces already expose so V2 callers can reach
vllm/entrypoints/generate/generative_scoring/serving.py
+2
@@ -93,6 +93,8 @@ class GenerativeScoringRequest(OpenAIBaseModel):
93
)
94
priority: int = Field(
95
default=0,
96
+ ge=-(2**63),
97
+ le=2**63 - 1,
98
description=(
99
"The priority of the request (lower means earlier handling; default: 0)."
100
),
vllm/entrypoints/pooling/embed/protocol.py
+1
-1
@@ -236,7 +236,7 @@ class CohereEmbedRequest(BaseModel):
236
embedding_types: list[CohereEmbeddingType] | None = None
237
truncate: CohereTruncate = "END"
238
max_tokens: int | None = None
239
- priority: int = 0
239
+ priority: int = Field(default=0, ge=-(2**63), le=2**63 - 1)
240
241
@model_validator(mode="after")
242
def validate_input_fields(self):