forked from phoenix/litellm-mirror
Litellm dev 11 11 2024 (#6693)
* fix(__init__.py): add 'watsonx_text' as mapped llm api route Fixes https://github.com/BerriAI/litellm/issues/6663 * fix(opentelemetry.py): fix passing parallel tool calls to otel Fixes https://github.com/BerriAI/litellm/issues/6677 * refactor(test_opentelemetry_unit_tests.py): create a base set of unit tests for all logging integrations - test for parallel tool call handling reduces bugs in repo * fix(__init__.py): update provider-model mapping to include all known provider-model mappings Fixes https://github.com/BerriAI/litellm/issues/6669 * feat(anthropic): support passing document in llm api call * docs(anthropic.md): add pdf anthropic call to docs + expose new 'supports_pdf_input' function * fix(factory.py): fix linting error
This commit is contained in:
parent
b8ae08b8eb
commit
f59cb46e71
21 changed files with 533 additions and 2264 deletions
|
@ -943,3 +943,24 @@ def test_validate_chat_completion_user_messages(messages, expected_bool):
|
|||
## Invalid message
|
||||
with pytest.raises(Exception):
|
||||
validate_chat_completion_user_messages(messages=messages)
|
||||
|
||||
|
||||
def test_models_by_provider():
|
||||
"""
|
||||
Make sure all providers from model map are in the valid providers list
|
||||
"""
|
||||
from litellm import models_by_provider
|
||||
|
||||
providers = set()
|
||||
for k, v in litellm.model_cost.items():
|
||||
if "_" in v["litellm_provider"] and "-" in v["litellm_provider"]:
|
||||
continue
|
||||
elif k == "sample_spec":
|
||||
continue
|
||||
elif v["litellm_provider"] == "sagemaker":
|
||||
continue
|
||||
else:
|
||||
providers.add(v["litellm_provider"])
|
||||
|
||||
for provider in providers:
|
||||
assert provider in models_by_provider.keys()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue