diff --git a/vllm/entrypoints/anthropic/protocol.py b/vllm/entrypoints/anthropic/protocol.py index 18000c4504..1ef5dbe1f0 100644 --- a/vllm/entrypoints/anthropic/protocol.py +++ b/vllm/entrypoints/anthropic/protocol.py @@ -141,6 +141,7 @@ class AnthropicMessagesRequest(BaseModel): cache_salt: str | None = Field( default=None, min_length=1, + max_length=1024, description=( "If specified, the prefix cache will be salted with the provided " "string to prevent an attacker to guess prompts in multi-user " diff --git a/vllm/entrypoints/openai/chat_completion/protocol.py b/vllm/entrypoints/openai/chat_completion/protocol.py index f3a3b398d6..964e93313d 100644 --- a/vllm/entrypoints/openai/chat_completion/protocol.py +++ b/vllm/entrypoints/openai/chat_completion/protocol.py @@ -467,6 +467,7 @@ class ChatCompletionRequest(OpenAIBaseModel): cache_salt: str | None = Field( default=None, min_length=1, + max_length=1024, description=( "If specified, the prefix cache will be salted with the provided " "string to prevent an attacker to guess prompts in multi-user " diff --git a/vllm/entrypoints/openai/completion/protocol.py b/vllm/entrypoints/openai/completion/protocol.py index 4b9ec1827e..590eba205b 100644 --- a/vllm/entrypoints/openai/completion/protocol.py +++ b/vllm/entrypoints/openai/completion/protocol.py @@ -199,6 +199,7 @@ class CompletionRequest(OpenAIBaseModel): cache_salt: str | None = Field( default=None, min_length=1, + max_length=1024, description=( "If specified, the prefix cache will be salted with the provided " "string to prevent an attacker to guess prompts in multi-user " diff --git a/vllm/entrypoints/openai/responses/protocol.py b/vllm/entrypoints/openai/responses/protocol.py index 48827ff941..691e9f30e3 100644 --- a/vllm/entrypoints/openai/responses/protocol.py +++ b/vllm/entrypoints/openai/responses/protocol.py @@ -252,6 +252,7 @@ class ResponsesRequest(OpenAIBaseModel): cache_salt: str | None = Field( default=None, min_length=1, + max_length=1024, description=( "If specified, the prefix cache will be salted with the provided " "string to prevent an attacker to guess prompts in multi-user " diff --git a/vllm/entrypoints/pooling/base/protocol.py b/vllm/entrypoints/pooling/base/protocol.py index b4f0ff21b8..dcdf453662 100644 --- a/vllm/entrypoints/pooling/base/protocol.py +++ b/vllm/entrypoints/pooling/base/protocol.py @@ -82,6 +82,8 @@ class PoolingBasicRequestMixin(OpenAIBaseModel): ) cache_salt: str | None = Field( default=None, + min_length=1, + max_length=1024, description=( "If specified, the prefix cache will be salted with the provided " "string to prevent an attacker to guess prompts in multi-user " diff --git a/vllm/entrypoints/scale_out/token_in_token_out/protocol.py b/vllm/entrypoints/scale_out/token_in_token_out/protocol.py index f304bf677b..e4338bf6bf 100644 --- a/vllm/entrypoints/scale_out/token_in_token_out/protocol.py +++ b/vllm/entrypoints/scale_out/token_in_token_out/protocol.py @@ -124,6 +124,7 @@ class GenerateRequest(BaseModel): cache_salt: str | None = Field( default=None, min_length=1, + max_length=1024, description=( "If specified, the prefix cache will be salted with the provided " "string to prevent an attacker to guess prompts in multi-user "