fix(sap): correct filtering of optional_params (#18716)

This commit is contained in:
vasilisazayka 2026-01-07 20:18:29 +04:00 committed by GitHub
parent bbabc1089c
commit b4a39a9ea2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -203,12 +203,8 @@ class GenAIHubOrchestrationConfig(OpenAIGPTConfig):
litellm_params: dict,
headers: dict,
) -> dict:
supported_params = self.get_supported_openai_params(model)
# Include extra params that passed validation (e.g., thinking_config for Gemini models via allowed_openai_params)
extra_params = [k for k in optional_params if k not in supported_params and k not in {"tools", "model_version"}]
supported_params = supported_params + extra_params
model_params = {
k: v for k, v in optional_params.items() if k in supported_params
k: v for k, v in optional_params.items() if k not in {"tools", "model_version", "deployment_url"}
}
model_version = optional_params.pop("model_version", "latest")