mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
QA: ensure all bedrock regional models have same supported_
as base + Anthropic nested pydantic object support (#7844)
All checks were successful
Read Version from pyproject.toml / read-version (push) Successful in 13s
All checks were successful
Read Version from pyproject.toml / read-version (push) Successful in 13s
* build: ensure all regional bedrock models have same supported values as base bedrock model prevents drift * test(base_llm_unit_tests.py): add testing for nested pydantic objects * fix(test_utils.py): add test_get_potential_model_names * fix(anthropic/chat/transformation.py): support nested pydantic objects Fixes https://github.com/BerriAI/litellm/issues/7755
This commit is contained in:
parent
62188a01b0
commit
71c41f8f33
12 changed files with 259 additions and 62 deletions
|
@ -42,16 +42,35 @@ class AmazonBedrockGlobalConfig:
|
|||
optional_params[mapped_params[param]] = value
|
||||
return optional_params
|
||||
|
||||
def get_all_regions(self) -> List[str]:
|
||||
return (
|
||||
self.get_us_regions()
|
||||
+ self.get_eu_regions()
|
||||
+ self.get_ap_regions()
|
||||
+ self.get_ca_regions()
|
||||
+ self.get_sa_regions()
|
||||
)
|
||||
|
||||
def get_ap_regions(self) -> List[str]:
|
||||
return ["ap-northeast-1", "ap-northeast-2", "ap-northeast-3", "ap-south-1"]
|
||||
|
||||
def get_sa_regions(self) -> List[str]:
|
||||
return ["sa-east-1"]
|
||||
|
||||
def get_eu_regions(self) -> List[str]:
|
||||
"""
|
||||
Source: https://www.aws-services.info/bedrock.html
|
||||
"""
|
||||
return [
|
||||
"eu-west-1",
|
||||
"eu-west-2",
|
||||
"eu-west-3",
|
||||
"eu-central-1",
|
||||
]
|
||||
|
||||
def get_ca_regions(self) -> List[str]:
|
||||
return ["ca-central-1"]
|
||||
|
||||
def get_us_regions(self) -> List[str]:
|
||||
"""
|
||||
Source: https://www.aws-services.info/bedrock.html
|
||||
|
@ -59,6 +78,7 @@ class AmazonBedrockGlobalConfig:
|
|||
return [
|
||||
"us-east-2",
|
||||
"us-east-1",
|
||||
"us-west-1",
|
||||
"us-west-2",
|
||||
"us-gov-west-1",
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue