Commit graph

44 commits

Author SHA1 Message Date
Krish Dholakia
c9318e08ad Litellm dev 11 23 2024 (#6881)
* build(ui/create_key_button.tsx): support adding tags for cost tracking/routing when making key

* LiteLLM Minor Fixes & Improvements (11/23/2024)  (#6870)

* feat(pass_through_endpoints/): support logging anthropic/gemini pass through calls to langfuse/s3/etc.

* fix(utils.py): allow disabling end user cost tracking with new param

Allows proxy admin to disable cost tracking for end user - keeps prometheus metrics small

* docs(configs.md): add disable_end_user_cost_tracking reference to docs

* feat(key_management_endpoints.py): add support for restricting access to `/key/generate` by team/proxy level role

Enables admin to restrict key creation, and assign team admins to handle distributing keys

* test(test_key_management.py): add unit testing for personal / team key restriction checks

* docs: add docs on restricting key creation

* docs(finetuned_models.md): add new guide on calling finetuned models

* docs(input.md): cleanup anthropic supported params

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

* test(test_embedding.py): add test for passing extra headers via embedding

* feat(cohere/embed): pass client to async embedding

* feat(rerank.py): add `/v1/rerank` if missing for cohere base url

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

* fix(main.py): pass extra_headers param to openai

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

* fix(litellm_logging.py): don't disable global callbacks when dynamic callbacks are set

Fixes issue where global callbacks - e.g. prometheus were overriden when langfuse was set dynamically

* fix(handler.py): fix linting error

* fix: fix typing

* build: add conftest to proxy_admin_ui_tests/

* test: fix test

* fix: fix linting errors

* test: fix test

* fix: fix pass through testing

* feat(key_management_endpoints.py): allow proxy_admin to enforce params on key creation

allows admin to force team keys to have tags

* build(ui/): show teams in leftnav + allow team admin to add new members

* build(ui/): show created tags in dropdown

makes it easier for admin to add tags to keys

* test(test_key_management.py): fix test

* test: fix test

* fix playwright e2e ui test

* fix e2e ui testing deps

* fix: fix linting errors

* fix e2e ui testing

* fix e2e ui testing, only run e2e ui testing in playwright

---------

Co-authored-by: Ishaan Jaff <ishaanjaffer0324@gmail.com>
2024-11-23 22:37:16 +05:30
Krish Dholakia
777ed61d0b LiteLLM Minor Fixes & Improvements (11/19/2024) (#6820)
* fix(anthropic/chat/transformation.py): add json schema as values: json_schema

fixes passing pydantic obj to anthropic

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

* (feat): Add timestamp_granularities parameter to transcription API (#6457)

* Add timestamp_granularities parameter to transcription API

* add param to the local test

* fix(databricks/chat.py): handle max_retries optional param handling for openai-like calls

Fixes issue with calling finetuned vertex ai models via databricks route

* build(ui/): add team admins via proxy ui

* fix: fix linting error

* test: fix test

* docs(vertex.md): refactor docs

* test: handle overloaded anthropic model error

* test: remove duplicate test

* test: fix test

* test: update test to handle model overloaded error

---------

Co-authored-by: Show <35062952+BrunooShow@users.noreply.github.com>
2024-11-21 00:57:58 +05:30
Ishaan Jaff
30842ffe31 (UI) Fix viewing members, keys in a team + added testing (#6514)
* fix listing teams on ui

* LiteLLM Minor Fixes & Improvements (10/28/2024)  (#6475)

* fix(anthropic/chat/transformation.py): support anthropic disable_parallel_tool_use param

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

* feat(anthropic/chat/transformation.py): support anthropic computer tool use

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

* fix(vertex_ai/common_utils.py): parse out '$schema' when calling vertex ai

Fixes issue when trying to call vertex from vercel sdk

* fix(main.py): add 'extra_headers' support for azure on all translation endpoints

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

* fix: fix linting errors

* fix(transformation.py): handle no beta headers for anthropic

* test: cleanup test

* fix: fix linting error

* fix: fix linting errors

* fix: fix linting errors

* fix(transformation.py): handle dummy tool call

* fix(main.py): fix linting error

* fix(azure.py): pass required param

* LiteLLM Minor Fixes & Improvements (10/24/2024) (#6441)

* fix(azure.py): handle /openai/deployment in azure api base

* fix(factory.py): fix faulty anthropic tool result translation check

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

* fix(gpt_transformation.py): add support for parallel_tool_calls to azure

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

* fix(factory.py): support anthropic prompt caching for tool results

* fix(vertex_ai/common_utils): don't pop non-null required field

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

* feat(vertex_ai.py): support code_execution tool call for vertex ai + gemini

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

* build(model_prices_and_context_window.json): Add 'supports_assistant_prefill' for bedrock claude-3-5-sonnet v2 models

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

* fix(types/utils.py): fix linting

* test: update test to include required fields

* test: fix test

* test: handle flaky test

* test: remove e2e test - hitting gemini rate limits

* Litellm dev 10 26 2024 (#6472)

* docs(exception_mapping.md): add missing exception types

Fixes https://github.com/Aider-AI/aider/issues/2120#issuecomment-2438971183

* fix(main.py): register custom model pricing with specific key

Ensure custom model pricing is registered to the specific model+provider key combination

* test: make testing more robust for custom pricing

* fix(redis_cache.py): instrument otel logging for sync redis calls

ensures complete coverage for all redis cache calls

* (Testing) Add unit testing for DualCache - ensure in memory cache is used when expected  (#6471)

* test test_dual_cache_get_set

* unit testing for dual cache

* fix async_set_cache_sadd

* test_dual_cache_local_only

* redis otel tracing + async support for latency routing (#6452)

* docs(exception_mapping.md): add missing exception types

Fixes https://github.com/Aider-AI/aider/issues/2120#issuecomment-2438971183

* fix(main.py): register custom model pricing with specific key

Ensure custom model pricing is registered to the specific model+provider key combination

* test: make testing more robust for custom pricing

* fix(redis_cache.py): instrument otel logging for sync redis calls

ensures complete coverage for all redis cache calls

* refactor: pass parent_otel_span for redis caching calls in router

allows for more observability into what calls are causing latency issues

* test: update tests with new params

* refactor: ensure e2e otel tracing for router

* refactor(router.py): add more otel tracing acrosss router

catch all latency issues for router requests

* fix: fix linting error

* fix(router.py): fix linting error

* fix: fix test

* test: fix tests

* fix(dual_cache.py): pass ttl to redis cache

* fix: fix param

* fix(dual_cache.py): set default value for parent_otel_span

* fix(transformation.py): support 'response_format' for anthropic calls

* fix(transformation.py): check for cache_control inside 'function' block

* fix: fix linting error

* fix: fix linting errors

---------

Co-authored-by: Ishaan Jaff <ishaanjaffer0324@gmail.com>

---------

Co-authored-by: Krish Dholakia <krrishdholakia@gmail.com>
2024-10-30 23:51:13 +05:30
Krrish Dholakia
a315fae120 fix(teams.tsx): add team_id to team table on ui 2024-08-13 16:08:49 -07:00
Krrish Dholakia
0b8cade30d fix(teams.tsx): reduce network calls to /team/info 2024-08-10 15:24:23 -07:00
Krrish Dholakia
cbad9e7502 build(ui): allow admin_viewer to view teams tab
Allows admin viewe role to see available teams on proxy ui
2024-08-02 16:19:40 -07:00
Ishaan Jaff
f9e6ac0542 switch off prod logs on ui 2024-07-30 13:23:45 -07:00
Krish Dholakia
a68e1bfae6 Merge pull request #4185 from BerriAI/litellm_reset_budget
Reset budget option for teams
2024-06-13 15:56:18 -07:00
Ishaan Jaff
0c0f81df38 fix - ui show correct team budget when budget = 0.0 2024-06-13 15:30:29 -07:00
Krrish Dholakia
fb5b80c279 build: allow resetting customer budget weekly + edit customer budget panel 2024-06-13 15:10:01 -07:00
Krrish Dholakia
c6fd17f639 build(ui/teams.tsx): allow resetting teams budget 2024-06-13 14:51:45 -07:00
Ishaan Jaff
a408ac76fb ui - clean up edit team input box 2024-05-13 16:36:21 -07:00
Nick Wong
609d263a08 added code to enforce unique key and team aliases in the ui 2024-05-10 15:42:07 -07:00
Ishaan Jaff
88b32c6248 ui - show num keys, members in team 2024-04-25 11:09:15 -07:00
Ishaan Jaff
5cc6dd0d03 ui - cleanup input text boxes 2024-04-22 13:34:23 -07:00
Ishaan Jaff
b0b79b3c20 feat- show errors 20s 2024-04-13 16:52:48 -07:00
Ishaan Jaff
347ab2c12f (ui) allow settig all proxy models 2024-04-02 18:02:23 -07:00
Ishaan Jaff
4ffb6a440d show all models in red on ui 2024-04-02 17:20:00 -07:00
Ishaan Jaff
6534f887cc support all-proxy-models for teams 2024-04-02 16:04:09 -07:00
Ishaan Jaff
857a7c9135 support all-models-on-proxy 2024-04-02 15:52:54 -07:00
Ishaan Jaff
38c4a56db6 ui - support all-models alias 2024-04-02 15:27:50 -07:00
Ishaan Jaff
2e08153342 ui use all_models alias 2024-04-02 15:01:42 -07:00
Ishaan Jaff
9e0e389109 (ui) view spend by team name on usage 2024-03-30 13:25:32 -07:00
Ishaan Jaff
2fade23b27 (new) ui build 2024-03-30 12:14:43 -07:00
Ishaan Jaff
08b87a1b90 (ui) edit teams 2024-03-30 12:14:33 -07:00
Ishaan Jaff
dd76517a0b (ui) working edit team 2024-03-30 12:14:33 -07:00
Ishaan Jaff
a2d3634c47 (ui) edit teams 2024-03-30 12:14:33 -07:00
Ishaan Jaff
63ee80e28f (ui) edit teams 2024-03-30 12:14:33 -07:00
Ishaan Jaff
c61e1de3de (feat) team add all models available 2024-03-29 16:28:36 -07:00
Ishaan Jaff
8e5dc563de (ui) team delete 2024-03-29 16:06:47 -07:00
Ishaan Jaff
234a3a1bf2 (ui) teams models 2024-03-29 09:29:51 -07:00
Ishaan Jaff
488330522b (ui) new build 2024-03-28 21:00:46 -07:00
Ishaan Jaff
d5a7ef440c (feat) make key/team name required on UI 2024-03-28 18:57:44 -07:00
Ishaan Jaff
a9399771d8 (fix) ui alignment 2024-03-28 18:50:32 -07:00
Ishaan Jaff
f0a81ea46f (fix) show models on team tab easily 2024-03-28 14:56:15 -07:00
Ishaan Jaff
80ab199e3d (fix) clean up team table 2024-03-28 14:41:16 -07:00
Ishaan Jaff
214485606f (feat) new ui build 2024-03-28 08:18:36 -07:00
Ishaan Jaff
5ad6e8c8f1 (feat) new ui build 2024-03-28 08:14:58 -07:00
Ishaan Jaff
602b4d8c03 (feat) admin UI show models on team table 2024-03-28 08:11:05 -07:00
Ishaan Jaff
7437d32ea6 (feat) ui - show models on create tab 2024-03-19 13:04:03 -07:00
Krrish Dholakia
e860cf949e fix(ui/user_dashboard.tsx): set selected team on team list load 2024-02-27 13:29:24 -08:00
Krrish Dholakia
cd6362313f build(ui): add compiled ui to proxy 2024-02-26 08:30:40 -08:00
Krrish Dholakia
22a6ad946e build(ui): enable admin to create teams, add members, create keys for teams 2024-02-24 22:06:00 -08:00
Krrish Dholakia
ef83d793f0 build(ui): add stubbed teams page 2024-02-24 16:14:21 -08:00