[Cohere] Bound remaining request priorities to the MessagePack int64 range (#56146)
Signed-off-by: Taneem Ibrahim <taneem.ibrahim@gmail.com>
This commit is contained in:
@@ -170,7 +170,7 @@ class CohereChatV2Request(BaseModel):
|
||||
thinking: Thinking | None = None
|
||||
|
||||
# Scheduling
|
||||
priority: int | None = None
|
||||
priority: int | None = Field(default=None, ge=-(2**63), le=2**63 - 1)
|
||||
|
||||
# vLLM-specific extensions (not in Cohere spec). These mirror what the
|
||||
# Anthropic and OpenAI surfaces already expose so V2 callers can reach
|
||||
|
||||
@@ -93,6 +93,8 @@ class GenerativeScoringRequest(OpenAIBaseModel):
|
||||
)
|
||||
priority: int = Field(
|
||||
default=0,
|
||||
ge=-(2**63),
|
||||
le=2**63 - 1,
|
||||
description=(
|
||||
"The priority of the request (lower means earlier handling; default: 0)."
|
||||
),
|
||||
|
||||
@@ -236,7 +236,7 @@ class CohereEmbedRequest(BaseModel):
|
||||
embedding_types: list[CohereEmbeddingType] | None = None
|
||||
truncate: CohereTruncate = "END"
|
||||
max_tokens: int | None = None
|
||||
priority: int = 0
|
||||
priority: int = Field(default=0, ge=-(2**63), le=2**63 - 1)
|
||||
|
||||
@model_validator(mode="after")
|
||||
def validate_input_fields(self):
|
||||
|
||||
Reference in New Issue
Block a user