fix(embeddings): forward embedding_dims to Titan V2 in AWS Bedrock embedder (#5671)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Lucas Kim
2026-06-22 11:49:23 +05:30
committed by GitHub
co-authored by Claude Opus 4.8
parent 1676b3168d
commit 513b56159f
2 changed files with 52 additions and 0 deletions
+5
View File
@@ -70,6 +70,11 @@ class AWSBedrockEmbedding(EmbeddingBase):
else:
# Amazon and other providers
input_body["inputText"] = text
# Titan Text Embeddings V2 accepts an optional output dimension
# (256/512/1024). Only forward embedding_dims when the user set it,
# mirroring the OpenAI embedder's guarded `dimensions` pass-through.
if self.config.embedding_dims is not None and "v2" in self.config.model:
input_body["dimensions"] = self.config.embedding_dims
body = json.dumps(input_body)