Commit Graph

23 Commits

Author SHA1 Message Date
Ishaan Jaffer 55572ce3cd test_add_model_run_health 2025-09-27 10:59:25 -07:00
Ishaan Jaffer 9e7ee0614a test fix 2025-09-27 10:01:14 -07:00
Alexsander Hamir eaa04cd8ce fix: use fastuuid helper (#14903)
* fix: use fastuuid helper across the codebase

First batch of changes, simple drop in replacement.

* second batch of changes

* fixed: script mistake on helper file
2025-09-25 15:47:01 -07:00
Krish Dholakia 8579332f44 Add model access groups on UI (#11719)
* fix(anthropic/chat/transformation.py): append prefix to start of assistant response, if set

ensures assistant response contains complete response

* fix(anthropic/chat/transformation.py): add flag to allow user to opt out of enabling prefix in prompt

* fix(anthropic/chat/transformation.py): working e2e support for prefix prompt in assistant response

* feat(networking.tsx): always include model access groups on UI

show admin created access groups when giving key/user/team model permissions

* feat(add_model_tab.tsx): initial ui component for adding to an existing model access group

allows user to add model to an access group (simplify giving users/keys/teams model access)

* feat(proxy_server.py): add 'only_model_access_groups' flag support to `/v1/models`

simplifies listing available access groups on UI

* test: add e2e test for new only_model_access_groups param

* feat(add_model_tab.tsx): allow adding+viewing model access groups on models tab

make feature functional on UI

* feat(view_users.tsx): route edit user to user info page

more detailed user edit

* feat(columns.tsx): route edit user to user info page

more detailed user edit

* fix(columns.tsx): fix linting error

* build(ui/): fix linting errors
2025-06-13 21:20:25 -07:00
Krish Dholakia 4c82dd9b27 Ollama Chat - parse tool calls on streaming (#11171)
* fix(user_api_key_auth.py): fix else block

Fixes https://github.com/BerriAI/litellm/issues/11170

* refactor(ollama/chat): refactor to base config pattern

easier to maintain fixes

* fix(ollama/chat): support tool call parsing on streaming

Closes https://github.com/BerriAI/litellm/issues/11104

* test: update import location

* fix: cleanup unused import

* fix: fix ruff check error

* test: update import

* test: update test on ci

* ci: cleanup

* fix: fix chekc

* fix: fix api key check order

* test: fix import

* ci: fix script

* test: fix imports

* fix: fix tests
2025-05-27 16:14:49 -07:00
Krish Dholakia 2ab00bd12c Litellm UI improvements 04 26 2025 p1 (#10346)
* fix(provider_info_helpers.tsx): fix together ai provider name

* fix(user_edit_view.tsx): all admin to edit user's personal models

* fix(model_dashboard.tsx): fix model filtering by team id check

* fix(proxy_server.py): support returning available models for a user on `/model_group/info`

Fixes issue where personal key with 'all team models' would see all proxy models (not just the ones user can call)

* test(test_models.py): add unit test for model group info check on personal key
2025-04-26 18:24:49 -07:00
Krish Dholakia 1ea046cc61 test: update tests to new deployment model (#10142)
* test: update tests to new deployment model

* test: update model name

* test: skip cohere rbac issue test

* test: update test - replace gpt-4o model
2025-04-18 14:22:12 -07:00
Krish Dholakia 6c69ad4c89 fix(model_management_endpoints.py): fix allowing team admins to update team models (#9697)
* fix(model_management_endpoints.py): fix allowing team admins to update their models

* test(test_models.py): add e2e test to for team model flow

ensure team admin can always add / edit / delete team models
2025-04-01 22:28:15 -07:00
Krish Dholakia 57e5ec07cc Improved wildcard route handling on /models and /model_group/info (#8473)
* fix(model_checks.py): update returning known model from wildcard to filter based on given model prefix

ensures wildcard route - `vertex_ai/gemini-*` just returns known vertex_ai/gemini- models

* test(test_proxy_utils.py): add unit testing for new 'get_known_models_from_wildcard' helper

* test(test_models.py): add e2e testing for `/model_group/info` endpoint

* feat(prometheus.py): support tracking total requests by user_email on prometheus

adds initial support for tracking total requests by user_email

* test(test_prometheus.py): add testing to ensure user email is always tracked

* test: update testing for new prometheus metric

* test(test_prometheus_unit_tests.py): add user email to total proxy metric

* test: update tests

* test: fix spend tests

* test: fix test

* fix(pagerduty.py): fix linting error
2025-02-11 19:37:43 -08:00
Krish Dholakia c8aa876785 fix(proxy_server.py): fix get model info when litellm_model_id is set + move model analytics to free (#7886)
* fix(proxy_server.py): fix get model info when litellm_model_id is set

Fixes https://github.com/BerriAI/litellm/issues/7873

* test(test_models.py): add test to ensure get model info on specific deployment has same value as all model info

Fixes https://github.com/BerriAI/litellm/issues/7873

* fix(usage.tsx): make model analytics free

Fixes @iqballx's feedback

* fix(fix(invoke_handler.py):-fix-bedrock-error-chunk-parsing): return correct bedrock status code and error message if chunk in stream

Improves bedrock stream error handling

* fix(proxy_server.py): fix linting errors

* test(test_auth_checks.py): remove redundant test

* fix(proxy_server.py): fix linting errors

* test: fix flaky test

* test: fix test
2025-01-21 08:19:07 -08:00
Krish Dholakia d57be47b0f Litellm ruff linting enforcement (#5992)
* ci(config.yml): add a 'check_code_quality' step

Addresses https://github.com/BerriAI/litellm/issues/5991

* ci(config.yml): check why circle ci doesn't pick up this test

* ci(config.yml): fix to run 'check_code_quality' tests

* fix(__init__.py): fix unprotected import

* fix(__init__.py): don't remove unused imports

* build(ruff.toml): update ruff.toml to ignore unused imports

* fix: fix: ruff + pyright - fix linting + type-checking errors

* fix: fix linting errors

* fix(lago.py): fix module init error

* fix: fix linting errors

* ci(config.yml): cd into correct dir for checks

* fix(proxy_server.py): fix linting error

* fix(utils.py): fix bare except

causes ruff linting errors

* fix: ruff - fix remaining linting errors

* fix(clickhouse.py): use standard logging object

* fix(__init__.py): fix unprotected import

* fix: ruff - fix linting errors

* fix: fix linting errors

* ci(config.yml): cleanup code qa step (formatting handled in local_testing)

* fix(_health_endpoints.py): fix ruff linting errors

* ci(config.yml): just use ruff in check_code_quality pipeline for now

* build(custom_guardrail.py): include missing file

* style(embedding_handler.py): fix ruff check
2024-10-01 19:44:20 -04:00
Ishaan Jaff 414af64343 test - OpenAI client is re-used for Azure, OpenAI 2024-05-10 13:43:19 -07:00
Krrish Dholakia 2ffd057042 test(test_models.py): ensure only admin can call /health 2024-04-16 18:13:40 -07:00
Krrish Dholakia 2d4fe072ad fix(proxy_server.py): fix delete models endpoint
https://github.com/BerriAI/litellm/issues/2951
2024-04-15 18:34:58 -07:00
Krrish Dholakia f9a9556f6c test(test_models.py): assert model id in db is the model id passed in 2024-04-15 17:37:45 -07:00
Ishaan Jaff ca95a64e05 fix test /health 2024-04-13 12:30:26 -07:00
Ishaan Jaff 6ad853c768 fix - test add models + call /health 2024-04-13 10:51:11 -07:00
Ishaan Jaff 4bf32cafa3 fix - add models + /health test 2024-04-13 10:49:41 -07:00
Ishaan Jaff f0ebadbb6f test - /health endpoints 2024-04-13 10:09:18 -07:00
Krrish Dholakia a652a9b3e9 test(test_models.py): combine add + delete model test 2024-04-08 13:29:03 -07:00
Krrish Dholakia 1ee78c39e9 fix(proxy_server.py): skip to next model if invalid model (raise logger.error) 2024-04-04 19:22:17 -07:00
Krrish Dholakia 4b56f08cbe test(test_models.py): fix delete model test 2024-04-04 08:46:08 -07:00
Krrish Dholakia f5ced089d6 test(tests/): add unit testing for proxy server endpoints 2024-01-19 14:54:29 -08:00