From d71d801e4d960f9327bb30a9ad764d01587b0138 Mon Sep 17 00:00:00 2001 From: Tim Elfrink Date: Tue, 7 Oct 2025 22:08:12 +0200 Subject: [PATCH] Add Cohere Embed v4 support for AWS Bedrock - Add cohere.embed-v4:0 to model pricing configs - Update bedrock_embedding_models constant - Update documentation with v4 model support Fixes #15272 --- docs/my-website/docs/providers/bedrock_embedding.md | 1 + litellm/constants.py | 1 + litellm/model_prices_and_context_window_backup.json | 10 ++++++++++ model_prices_and_context_window.json | 10 ++++++++++ 4 files changed, 22 insertions(+) diff --git a/docs/my-website/docs/providers/bedrock_embedding.md b/docs/my-website/docs/providers/bedrock_embedding.md index 69c5f3c86e..cd49208471 100644 --- a/docs/my-website/docs/providers/bedrock_embedding.md +++ b/docs/my-website/docs/providers/bedrock_embedding.md @@ -265,6 +265,7 @@ print(response) | TwelveLabs Marengo Embed 2.7 | `embedding(model="bedrock/us.twelvelabs.marengo-embed-2-7-v1:0", input=input)` | Supports multimodal input (text, video, audio, image) | | Cohere Embeddings - English | `embedding(model="bedrock/cohere.embed-english-v3", input=input)` | [here](https://github.com/BerriAI/litellm/blob/f5905e100068e7a4d61441d7453d7cf5609c2121/litellm/llms/bedrock/embed/cohere_transformation.py#L18) | Cohere Embeddings - Multilingual | `embedding(model="bedrock/cohere.embed-multilingual-v3", input=input)` | [here](https://github.com/BerriAI/litellm/blob/f5905e100068e7a4d61441d7453d7cf5609c2121/litellm/llms/bedrock/embed/cohere_transformation.py#L18) +| Cohere Embed v4 | `embedding(model="bedrock/cohere.embed-v4:0", input=input)` | Supports text and image input, configurable dimensions (256, 512, 1024, 1536), 128k context length | ### Advanced - [Drop Unsupported Params](https://docs.litellm.ai/docs/completion/drop_params#openai-proxy-usage) diff --git a/litellm/constants.py b/litellm/constants.py index 3ff9a4b6fb..7fe0e69a41 100644 --- a/litellm/constants.py +++ b/litellm/constants.py @@ -871,6 +871,7 @@ bedrock_embedding_models: set = set( "amazon.titan-embed-text-v1", "cohere.embed-english-v3", "cohere.embed-multilingual-v3", + "cohere.embed-v4:0", "twelvelabs.marengo-embed-2-7-v1:0", ] ) diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.json index a3f38e47bf..bdfc4fd020 100644 --- a/litellm/model_prices_and_context_window_backup.json +++ b/litellm/model_prices_and_context_window_backup.json @@ -5294,6 +5294,16 @@ "output_cost_per_token": 0.0, "supports_embedding_image_input": true }, + "cohere.embed-v4:0": { + "input_cost_per_token": 1.2e-07, + "litellm_provider": "bedrock", + "max_input_tokens": 128000, + "max_tokens": 128000, + "mode": "embedding", + "output_cost_per_token": 0.0, + "output_vector_size": 1536, + "supports_embedding_image_input": true + }, "cohere.rerank-v3-5:0": { "input_cost_per_query": 0.002, "input_cost_per_token": 0.0, diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.json index a3f38e47bf..bdfc4fd020 100644 --- a/model_prices_and_context_window.json +++ b/model_prices_and_context_window.json @@ -5294,6 +5294,16 @@ "output_cost_per_token": 0.0, "supports_embedding_image_input": true }, + "cohere.embed-v4:0": { + "input_cost_per_token": 1.2e-07, + "litellm_provider": "bedrock", + "max_input_tokens": 128000, + "max_tokens": 128000, + "mode": "embedding", + "output_cost_per_token": 0.0, + "output_vector_size": 1536, + "supports_embedding_image_input": true + }, "cohere.rerank-v3-5:0": { "input_cost_per_query": 0.002, "input_cost_per_token": 0.0,