mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 03:04:13 +00:00
test(test_get_llm_provider.py): Minimal repro for https://github.com/BerriAI/litellm/issues/9291
This commit is contained in:
parent
c3ee93cd81
commit
aeec703c4e
1 changed files with 17 additions and 0 deletions
|
@ -216,3 +216,20 @@ def test_bedrock_invoke_anthropic():
|
|||
)
|
||||
assert custom_llm_provider == "bedrock"
|
||||
assert model == "invoke/anthropic.claude-3-5-sonnet-20240620-v1:0"
|
||||
|
||||
|
||||
def test_xai_api_base():
|
||||
args = {
|
||||
"model": "xai/grok-2-vision-latest",
|
||||
"custom_llm_provider": "xai",
|
||||
"api_base": None,
|
||||
"api_key": "xai-my-specialkey",
|
||||
"litellm_params": None,
|
||||
}
|
||||
model, custom_llm_provider, dynamic_api_key, api_base = litellm.get_llm_provider(
|
||||
**args
|
||||
)
|
||||
assert custom_llm_provider == "xai"
|
||||
assert model == "grok-2-vision-latest"
|
||||
assert api_base == "https://api.x.ai/v1"
|
||||
assert dynamic_api_key == "xai-my-specialkey"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue