mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
Merge branch 'main' into litellm_track_imagen_spend_logs
This commit is contained in:
commit
c1adb0b7f2
32 changed files with 1384 additions and 226 deletions
|
@ -75,3 +75,28 @@ def test_get_llm_provider_vertex_ai_image_models():
|
|||
model="imagegeneration@006", custom_llm_provider=None
|
||||
)
|
||||
assert custom_llm_provider == "vertex_ai"
|
||||
|
||||
def test_get_llm_provider_ai21_chat():
|
||||
model, custom_llm_provider, dynamic_api_key, api_base = litellm.get_llm_provider(
|
||||
model="jamba-1.5-large",
|
||||
)
|
||||
assert custom_llm_provider == "ai21_chat"
|
||||
assert model == "jamba-1.5-large"
|
||||
assert api_base == "https://api.ai21.com/studio/v1"
|
||||
|
||||
|
||||
def test_get_llm_provider_ai21_chat_test2():
|
||||
"""
|
||||
if user prefix with ai21/ but calls jamba-1.5-large then it should be ai21_chat provider
|
||||
"""
|
||||
model, custom_llm_provider, dynamic_api_key, api_base = litellm.get_llm_provider(
|
||||
model="ai21/jamba-1.5-large",
|
||||
)
|
||||
|
||||
print("model=", model)
|
||||
print("custom_llm_provider=", custom_llm_provider)
|
||||
print("api_base=", api_base)
|
||||
assert custom_llm_provider == "ai21_chat"
|
||||
assert model == "jamba-1.5-large"
|
||||
assert api_base == "https://api.ai21.com/studio/v1"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue