mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
fix(utils.py): fix get_llm_provider to handle the ':' in anthropic/bedrock calls
This commit is contained in:
parent
2b04dc310a
commit
3846ec6124
2 changed files with 22 additions and 9 deletions
19
litellm/tests/test_get_llm_provider.py
Normal file
19
litellm/tests/test_get_llm_provider.py
Normal file
|
@ -0,0 +1,19 @@
|
|||
import sys, os
|
||||
import traceback
|
||||
from dotenv import load_dotenv
|
||||
|
||||
load_dotenv()
|
||||
import os, io
|
||||
|
||||
sys.path.insert(
|
||||
0, os.path.abspath("../..")
|
||||
) # Adds the parent directory to the system path
|
||||
import pytest
|
||||
import litellm
|
||||
|
||||
def test_get_llm_provider():
|
||||
_, response, _, _ = litellm.get_llm_provider(model="anthropic.claude-v2:1")
|
||||
|
||||
assert response == "bedrock"
|
||||
|
||||
test_get_llm_provider()
|
Loading…
Add table
Add a link
Reference in a new issue