fix(anthropic): extract api_base from litellm_params in batches/files validate_environment

This commit is contained in:
rupak-eng 2026-06-22 01:25:49 +05:30
parent b490e80581
commit 11b339496c
2 changed files with 4 additions and 0 deletions

View file

@ -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(

View file

@ -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(