mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-17 23:51:30 +00:00
select_model_for_request_transformation
This commit is contained in:
parent
27c085cc56
commit
fb31006cd8
2 changed files with 4 additions and 8 deletions
|
|
@ -1097,8 +1097,10 @@ def completion( # type: ignore # noqa: PLR0915
|
|||
logit_bias=logit_bias,
|
||||
user=user,
|
||||
# params to identify the model
|
||||
model=model,
|
||||
base_model=base_model,
|
||||
model=LitellmCoreRequestUtils.select_model_for_request_transformation(
|
||||
model=model,
|
||||
base_model=base_model,
|
||||
),
|
||||
custom_llm_provider=custom_llm_provider,
|
||||
response_format=response_format,
|
||||
seed=seed,
|
||||
|
|
|
|||
|
|
@ -2847,18 +2847,12 @@ def get_optional_params( # noqa: PLR0915
|
|||
additional_drop_params=None,
|
||||
messages: Optional[List[AllMessageValues]] = None,
|
||||
thinking: Optional[AnthropicThinkingParam] = None,
|
||||
base_model: Optional[str] = None,
|
||||
**kwargs,
|
||||
):
|
||||
# retrieve all parameters passed to the function
|
||||
passed_params = locals().copy()
|
||||
special_params = passed_params.pop("kwargs")
|
||||
|
||||
# Use `base_model` for paramter mapping if passed in by user
|
||||
model = LitellmCoreRequestUtils.select_model_for_request_transformation(
|
||||
model=model,
|
||||
base_model=base_model,
|
||||
)
|
||||
for k, v in special_params.items():
|
||||
if k.startswith("aws_") and (
|
||||
custom_llm_provider != "bedrock" and custom_llm_provider != "sagemaker"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue