mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-09 03:18:44 +00:00
fix(anthropic): extract api_base from litellm_params in batches/files validate_environment
This commit is contained in:
parent
b490e80581
commit
11b339496c
2 changed files with 4 additions and 0 deletions
|
|
@ -43,6 +43,8 @@ class AnthropicBatchesConfig(BaseBatchesConfig):
|
|||
api_base: Optional[str] = None,
|
||||
) -> dict:
|
||||
"""Validate and prepare environment-specific headers and parameters."""
|
||||
if api_base is None and isinstance(litellm_params, dict):
|
||||
api_base = litellm_params.get("api_base")
|
||||
auth_header = self.anthropic_model_info.get_auth_header(api_key, api_base)
|
||||
if auth_header is None:
|
||||
raise ValueError(
|
||||
|
|
|
|||
|
|
@ -95,6 +95,8 @@ class AnthropicFilesConfig(BaseFilesConfig):
|
|||
api_key: Optional[str] = None,
|
||||
api_base: Optional[str] = None,
|
||||
) -> dict:
|
||||
if api_base is None and isinstance(litellm_params, dict):
|
||||
api_base = litellm_params.get("api_base")
|
||||
auth_header = AnthropicModelInfo.get_auth_header(api_key, api_base)
|
||||
if auth_header is None:
|
||||
raise ValueError(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue