Remove map_openai_params method

Removed the map_openai_params method from the transformation.py file.
This commit is contained in:
Esteban Zeller 2026-02-25 18:30:10 -03:00 • committed by GitHub
parent bf874fd7ce
commit bd8e46df9e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -129,33 +129,3 @@ class GradientAIConfig(OpenAILikeChatConfig):
dynamic_api_key = api_key or get_secret_str("GRADIENT_AI_API_KEY")
return api_base, dynamic_api_key
def map_openai_params(
self,
non_default_params: dict,
optional_params: dict,
model: str,
drop_params: bool = False,
replace_max_completion_tokens_with_max_tokens: bool = False,
) -> dict:
optional_params = super().map_openai_params(
non_default_params=non_default_params,
optional_params=optional_params,
model=model,
drop_params=drop_params,
replace_max_completion_tokens_with_max_tokens=replace_max_completion_tokens_with_max_tokens,
)
supported_openai_params = self.get_supported_openai_params(model=model)
for param, value in non_default_params.items():
if param in supported_openai_params:
optional_params[param] = value
elif not drop_params:
from litellm.utils import UnsupportedParamsError
raise UnsupportedParamsError(
status_code=400,
message=f"GradientAI does not support parameter '{param}'. To drop unsupported params, set `drop_params=True`."
)
return optional_params