fix openrouter issue

This commit is contained in:
Krrish Dholakia 2023-09-20 20:38:31 -07:00
parent 86f9991412
commit e48e1a4597
5 changed files with 5 additions and 2 deletions

View file

@ -101,7 +101,8 @@ for key, value in model_cost.items():
elif value.get('litellm_provider') == 'anthropic':
anthropic_models.append(key)
elif value.get('litellm_provider') == 'openrouter':
openrouter_models.append(key)
split_string = key.split('/', 1)
openrouter_models.append(split_string[1])
elif value.get('litellm_provider') == 'vertex_ai-text-models':
vertex_text_models.append(key)
elif value.get('litellm_provider') == 'vertex_ai-code-text-models':

View file

@ -336,6 +336,8 @@ def test_completion_openai_litellm_key():
# except Exception as e:
# pytest.fail(f"Error occurred: {e}")
# test_completion_openrouter()
def test_completion_openai_with_more_optional_params():
try:
response = completion(
@ -816,7 +818,7 @@ def test_completion_ai21():
except Exception as e:
pytest.fail(f"Error occurred: {e}")
# test_completion_ai21()
test_completion_ai21()
# test config file with completion #
# def test_completion_openai_config():
# try: