add api_base to _client_params (community version of #14393) (#14644)

- **Description:** This PR adds `api_base` to `_client_params` in the
`chat_model` of LiteLLM to ensure it's included in API calls.
Previously, `api_base` was set on the client but was not included in the
parameters passed to the completion function. This change ensures that
`api_base` is correctly passed to all API calls.
  - **Issue:** #14338
  - **Tag maintainer:** @hwchase17 @agola11
  - **Twitter handle:** @LMS_David_RS
pull/15102/head^2
David 9 months ago committed by GitHub
parent 3bd0a15506
commit dcf047c48f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -223,6 +223,7 @@ class ChatLiteLLM(BaseChatModel):
creds: Dict[str, Any] = { creds: Dict[str, Any] = {
"model": set_model_value, "model": set_model_value,
"force_timeout": self.request_timeout, "force_timeout": self.request_timeout,
"api_base": self.api_base,
} }
return {**self._default_params, **creds} return {**self._default_params, **creds}

Loading…
Cancel
Save