Commit graph

18466 commits

Author SHA1 Message Date
Ishaan Jaff
d2a76c6c45 Resolved merge conflicts 2024-11-24 16:35:16 -08:00
Ishaan Jaff
530946d169 Merge branch 'main' into litellm_provider_budget_improvements 2024-11-24 16:32:27 -08:00
Ishaan Jaff
f80f4b0f9e test_redis_increment_pipeline 2024-11-24 16:31:47 -08:00
Ishaan Jaff
4ff941eeba unit testing for provider budgets 2024-11-24 16:22:32 -08:00
Ishaan Jaff
d27b527477 add clear doc strings 2024-11-24 16:17:07 -08:00
Ishaan Jaff
2fb9b245a1 fix set attr 2024-11-24 15:54:28 -08:00
Ishaan Jaff
ac57638434 fix typing async_increment_pipeline 2024-11-24 15:50:57 -08:00
Ishaan Jaff
8aa8f2e4ab add handling for budget windows 2024-11-24 15:47:56 -08:00
Ishaan Jaff
be25706736 use consistent key name for increment op 2024-11-24 10:22:00 -08:00
Ishaan Jaff
c4937dffe2 use redis async_increment_pipeline 2024-11-24 09:45:33 -08:00
Ishaan Jaff
87e30cd562 use lower value for testing 2024-11-24 09:42:40 -08:00
Ishaan Jaff
24ab979486 use redis async_increment_pipeline 2024-11-24 09:42:25 -08:00
Ishaan Jaff
5dd8726685 add redis async_increment_pipeline 2024-11-24 09:40:26 -08:00
Ishaan Jaff
8f74da6438 use RedisPipelineIncrementOperation 2024-11-24 09:38:47 -08:00
Ishaan Jaff
a061f0e39c add comments on provider budget routing 2024-11-23 18:25:28 -08:00
Ishaan Jaff
6db00270c1 fix router testing for provider budgets 2024-11-23 18:20:56 -08:00
Ishaan Jaff
face50edad add fixture for provider budget routing 2024-11-23 18:16:20 -08:00
Ishaan Jaff
6f4fdc58c7 working provider budget tests 2024-11-23 18:09:47 -08:00
Ishaan Jaff
a40b3bcbbd fix test provider budgets 2024-11-23 18:07:56 -08:00
Ishaan Jaff
34bfebe470
(QOL improvement) Provider budget routing - allow using 1s, 1d, 1mo, 2mo etc (#6885)
* use 1 file for duration_in_seconds

* add to readme.md

* re use duration_in_seconds

* fix importing _extract_from_regex, get_last_day_of_month

* fix import

* update provider budget routing

* fix - remove dup test
2024-11-23 16:59:46 -08:00
Ishaan Jaff
d86a7c3702 fix code quality check 2024-11-23 16:52:45 -08:00
Ishaan Jaff
e5c7189922 fix test_in_memory_redis_sync_e2e 2024-11-23 16:48:36 -08:00
Ishaan Jaff
e69678a9b3 update doc title 2024-11-23 16:25:00 -08:00
Ishaan Jaff
33a0744abe test_in_memory_redis_sync_e2e 2024-11-23 16:24:13 -08:00
Ishaan Jaff
5f04c04cc5 test_in_memory_redis_sync_e2e 2024-11-23 16:20:41 -08:00
Krrish Dholakia
3d8c0bad58 build(ui/): update ui build 2024-11-24 05:32:26 +05:30
Ishaan Jaff
afc69761de
docs - have 1 section for routing +load balancing (#6884)
* docs - have 1 section for routing +load balancing

* remove emoji
2024-11-23 15:56:57 -08:00
Ishaan Jaff
84395e7a19 add support for using in multi instance environments 2024-11-23 15:46:39 -08:00
Ishaan Jaff
94e2e292cd fix - remove dup test 2024-11-23 13:27:56 -08:00
Ishaan Jaff
ac4ecce2bc update provider budget routing 2024-11-23 12:49:13 -08:00
Ishaan Jaff
cf76f308de fix import 2024-11-23 12:47:06 -08:00
Ishaan Jaff
c88048ae5c fix importing _extract_from_regex, get_last_day_of_month 2024-11-23 12:46:49 -08:00
Ishaan Jaff
2b9ff03cd0 re use duration_in_seconds 2024-11-23 12:44:28 -08:00
Ishaan Jaff
653d16e158 add to readme.md 2024-11-23 12:43:01 -08:00
Ishaan Jaff
37462ea55c use 1 file for duration_in_seconds 2024-11-23 12:42:33 -08:00
Krrish Dholakia
50314a66ca bump: version 1.52.14 → 1.52.15 2024-11-23 23:43:30 +05:30
Krrish Dholakia
19a7932329 build: update ui build 2024-11-23 23:32:08 +05:30
Krish Dholakia
424b8b0231
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
Ishaan Jaff
6b6353d4e7 fix e2e ui testing, only run e2e ui testing in playwright 2024-11-23 08:50:10 -08:00
Ishaan Jaff
f3ffa67553 fix e2e ui testing 2024-11-23 08:45:14 -08:00
Ishaan Jaff
fb5f458448 fix e2e ui testing deps 2024-11-23 08:39:11 -08:00
Ishaan Jaff
a8b4e1cc03 fix playwright e2e ui test 2024-11-23 08:34:55 -08:00
Krish Dholakia
7e9d8b58f6
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
2024-11-23 15:17:40 +05:30
Ishaan Jaff
d81ae45827
(Perf / latency improvement) improve pass through endpoint latency to ~50ms (before PR was 400ms) (#6874)
* use correct location for types

* fix types location

* perf improvement for pass through endpoints

* update lint check

* fix import

* fix ensure async clients test

* fix azure.py health check

* fix ollama
2024-11-22 18:47:26 -08:00
dependabot[bot]
772b2f9cd2
Bump cross-spawn from 7.0.3 to 7.0.6 in /ui/litellm-dashboard (#6865)
Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.6.
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6)

---
updated-dependencies:
- dependency-name: cross-spawn
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-22 17:42:08 -08:00
Ishaan Jaff
97cde31113
fix tests (#6875) 2024-11-22 17:35:38 -08:00
Ishaan Jaff
b2b3e40d13
(feat) use @google-cloud/vertexai js sdk with litellm (#6873)
* stash gemini JS test

* add vertex js sdj example

* handle vertex pass through separately

* tes vertex JS sdk

* fix vertex_proxy_route

* use PassThroughStreamingHandler

* fix PassThroughStreamingHandler

* use common _create_vertex_response_logging_payload_for_generate_content

* test vertex js

* add working vertex jest tests

* move basic bass through test

* use good name for test

* test vertex

* test_chunk_processor_yields_raw_bytes

* unit tests for streaming

* test_convert_raw_bytes_to_str_lines

* run unit tests 1st

* simplify local

* docs add usage example for js

* use get_litellm_virtual_key

* add unit tests for vertex pass through
2024-11-22 16:50:10 -08:00
Ishaan Jaff
5930c42e74 fix coverage 2024-11-22 16:21:22 -08:00
Ishaan Jaff
377cfeb24f add pass_through_unit_testing 2024-11-22 16:20:16 -08:00
Krrish Dholakia
d8e5134935 test: skip flaky test 2024-11-22 19:23:36 +05:30