litellm/tests
Camille Farineau b88e56ebde
Fix/issue 10113 embeddings use non default tokenizer (#10629)
* fix(embeddings): use non default tokenizer when passing list of lists of tokens (int)

* feat(embeddings): allow for passthrough of list of lists of tokens to hosted_vllm models

* Revert "fix(embeddings): use non default tokenizer when passing list of lists of tokens (int)"

This reverts commit a48acd95f860c4fc85853e20668eabffff07cae7.

* refactor(embeddings): use a list to verify if provider accept as input a list of tokens

* fix(embeddings): verify the model name before validating if provider accept a arrays of tokens as input

When passing a list of tokens as input, verify the provider of the model by going through the list of models (`llm_model_list`). First, it check for model name then get the provider and verify if it accept or not arrays of tokens. If yes, then pass, else decode.
Previously, it was verifying provider and model name at the same time resulting in decoding even if the current model checked was not the target one (looping onto `llm_model_list`)

* test(embedding): add unit test to bypass decode for some providers with input as array of tokens

Ref: https://github.com/BerriAI/litellm/issues/10113
2025-05-14 22:55:49 -07:00
..
basic_proxy_startup_tests
batches_tests VertexAI non-jsonl file storage support (#9781) 2025-04-09 14:01:48 -07:00
code_coverage_tests Add target model name validation (#10722) 2025-05-10 14:27:06 -07:00
documentation_tests
enterprise fix(router.py): write file to all deployments (#10708) 2025-05-10 00:08:30 -07:00
guardrails_tests [Feat] Presidio Improvements - Allow adding presidio api base on UI, Test presidio on Test Key, fixes for running presidio hook (#10840) 2025-05-14 17:41:33 -07:00
image_gen_tests Fix azure dall e 3 call with custom model name + Handle Bearer $LITELLM_API_KEY in x-litellm-api-key custom header (#10776) 2025-05-12 22:49:35 -07:00
litellm Fix/issue 10113 embeddings use non default tokenizer (#10629) 2025-05-14 22:55:49 -07:00
litellm_utils_tests test: fix groq/gemma2-9b-it 2025-05-14 19:24:20 -07:00
litellm-proxy-extras Prisma Migrate - support setting custom migration dir (#10336) 2025-04-26 12:05:06 -07:00
llm_responses_api_testing test: handle internal server errors 2025-05-01 16:47:30 -07:00
llm_translation Anthropic unified web search + tool cost tracking support (#10846) 2025-05-14 22:41:12 -07:00
load_tests test: test_embedding_performance 2025-05-14 21:31:07 -07:00
local_testing fix arize config tests 2025-05-13 20:21:14 -07:00
logging_callback_tests [Feat] Presidio Improvements - Allow adding presidio api base on UI, Test presidio on Test Key, fixes for running presidio hook (#10840) 2025-05-14 17:41:33 -07:00
mcp_tests test fixes 2025-03-29 18:34:58 -07:00
multi_instance_e2e_tests
old_proxy_tests/tests test: update tests to new deployment model (#10142) 2025-04-18 14:22:12 -07:00
openai_endpoints_tests # expect an error when getting the response again since 2025-04-25 09:42:35 -07:00
otel_tests Refactor budget assertions in tests to improve clarity and accuracy. Updated remaining hours check to ensure positive values and adjusted budget reset time validation for better range checks. (#10500) 2025-05-02 09:02:02 -07:00
pass_through_tests test: add more debug logs 2025-04-29 15:40:18 -07:00
pass_through_unit_tests [Fix] Allow using dynamic aws_region with /messages on Bedrock (#10779) 2025-05-12 20:22:38 -07:00
proxy_admin_ui_tests fix(model_management_endpoints.py): allow team admin to update model … (#10539) 2025-05-03 19:34:35 -07:00
proxy_security_tests
proxy_unit_tests fix failing test typo (#10843) 2025-05-14 20:46:52 -07:00
router_unit_tests complete unified batch id support - replace model in jsonl to be deployment model name (#10719) 2025-05-10 12:04:01 -07:00
scim_tests [Feat SSO] Add LiteLLM SCIM Integration for Team and User management (#10072) 2025-04-16 19:21:47 -07:00
spend_tracking_tests test_long_term_spend_accuracy_with_bursts 2025-03-31 21:09:29 -07:00
store_model_in_db_tests fix(router.py): handle edge case where user sets 'model_group' inside… (#10191) 2025-04-21 16:17:45 -07:00
windows_tests [Bug Fix] UnicodeDecodeError: 'charmap' on Windows during litellm import (#10542) 2025-05-03 21:31:05 -07:00
gettysburg.wav
large_text.py
openai_batch_completions.jsonl
README.MD
test_callbacks_on_proxy.py
test_config.py
test_debug_warning.py
test_end_users.py test: run test earlier to catch error 2025-03-27 23:08:52 -07:00
test_entrypoint.py
test_fallbacks.py
test_health.py
test_keys.py test: temporarily skip test due to change testing model change - need to update test for new model 2025-05-09 09:02:08 -07:00
test_logging.conf
test_models.py Litellm UI improvements 04 26 2025 p1 (#10346) 2025-04-26 18:24:49 -07:00
test_openai_endpoints.py
test_organizations.py UI - fix adding vertex models with reusable credentials + fix pagination on keys table + fix showing org budgets on table (#10528) 2025-05-03 08:16:53 -07:00
test_passthrough_endpoints.py
test_ratelimit.py
test_spend_logs.py
test_team_logging.py
test_team_members.py
test_team.py fix: test_team_update_sc_2 2025-05-09 11:59:13 -07:00
test_users.py

In total litellm runs 1000+ tests

[02/20/2025] Update:

To make it easier to contribute and map what behavior is tested,

we've started mapping the litellm directory in tests/litellm

This folder can only run mock tests.