From c2e8da1e65d92392c7e27de9faf67890bacf4173 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=B6bius?= Date: Sat, 4 Apr 2026 09:19:51 +0200 Subject: [PATCH] Add truncate_prompt_tokens param for vllm embedding vllm embedding should allow sending "truncate_prompt_tokens". Links to https://github.com/vllm-project/vllm/blob/main/vllm/entrypoints/pooling/embed/protocol.py#L66 --- litellm/llms/hosted_vllm/embedding/transformation.py | 1 + 1 file changed, 1 insertion(+) diff --git a/litellm/llms/hosted_vllm/embedding/transformation.py b/litellm/llms/hosted_vllm/embedding/transformation.py index 9c3e8c6c7cc..0db3e820a85 100644 --- a/litellm/llms/hosted_vllm/embedding/transformation.py +++ b/litellm/llms/hosted_vllm/embedding/transformation.py @@ -150,6 +150,7 @@ class HostedVLLMEmbeddingConfig(BaseEmbeddingConfig): "dimensions", "encoding_format", "user", + "truncate_prompt_tokens", ] def map_openai_params(