From 338379bf40359aac9d04a00b6466696f2ef963c6 Mon Sep 17 00:00:00 2001 From: Vasilisa Parshikova Date: Wed, 11 Mar 2026 13:42:46 +0400 Subject: [PATCH] (sap) fix after bot review --- litellm/llms/sap/chat/models.py | 6 +++--- litellm/llms/sap/chat/transformation.py | 2 +- litellm/llms/sap/embed/transformation.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/litellm/llms/sap/chat/models.py b/litellm/llms/sap/chat/models.py index a82a9fc6f26..daaf83b6384 100644 --- a/litellm/llms/sap/chat/models.py +++ b/litellm/llms/sap/chat/models.py @@ -144,13 +144,13 @@ class DocumentMetadataKeyValueListPairs(KeyValueListPair): class GroundingSearchConfig(BaseModel): - max_chunk_count: int = Field(default=None, ge=0) - max_document_count: int = Field(default=None, ge=0) + max_chunk_count: Optional[int] = Field(default=None, ge=0) + max_document_count: Optional[int] = Field(default=None, ge=0) @model_validator(mode='after') def validate_max_chunk_count_and_max_document_count(self): if self.max_chunk_count and self.max_document_count: - raise ValidationError("Cannot specify both maxChunkCount and maxDocumentCount.") + raise ValueError("Cannot specify both maxChunkCount and maxDocumentCount.") return self diff --git a/litellm/llms/sap/chat/transformation.py b/litellm/llms/sap/chat/transformation.py index 04ea1494f01..ff696d66fea 100755 --- a/litellm/llms/sap/chat/transformation.py +++ b/litellm/llms/sap/chat/transformation.py @@ -284,7 +284,7 @@ class GenAIHubOrchestrationConfig(OpenAIGPTConfig): for modules_dict in fallback_modules: fallback_model = modules_dict.pop("model") - if fallback_model.startswith("sap"): + if fallback_model.startswith("sap/"): fallback_model = fallback_model[4:] fallback_template = modules_dict.pop("messages", []) diff --git a/litellm/llms/sap/embed/transformation.py b/litellm/llms/sap/embed/transformation.py index d8697e2b9d6..090b2d17f48 100644 --- a/litellm/llms/sap/embed/transformation.py +++ b/litellm/llms/sap/embed/transformation.py @@ -64,11 +64,11 @@ class EmbeddingInput(BaseModel): text: Union[str, List[str]] type: Literal["text", "document", "query"] = "text" -class EmbeddingComfig(BaseModel): +class EmbeddingConfig(BaseModel): modules: EmbeddingsModules class EmbeddingRequest(BaseModel): - config: EmbeddingComfig + config: EmbeddingConfig input: EmbeddingInput