Commit graph

18452 commits

Author SHA1 Message Date
paul-gauthier
d84e355eab
sonnet supports pdf, haiku does not (#6928) 2024-11-26 19:06:17 -08:00
Ishaan Jaff
8fd3bf34d8
(feat) pass through llm endpoints - add PATCH support (vertex context caching requires for update ops) (#6924)
* add PATCH for pass through endpoints

* test_pass_through_routes_support_all_methods
2024-11-26 14:39:13 -08:00
Krish Dholakia
8673f2541e
fix(key_management_endpoints.py): fix user-membership check when creating team key (#6890)
* fix(key_management_endpoints.py): fix user-membership check when creating team key

* docs: add deprecation notice on original `/v1/messages` endpoint + add better swagger tags on pass-through endpoints

* fix(gemini/): fix image_url handling for gemini

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

* fix(teams.tsx): fix member add when role is 'user'

* fix(team_endpoints.py): /team/member_add

fix adding several new members to team

* test(test_vertex.py): remove redundant test

* test(test_proxy_server.py): fix team member add tests
2024-11-26 14:19:24 +05:30
Ishaan Jaff
dcea31e50a run ci/cd again for new release 2024-11-26 00:26:27 -08:00
Krrish Dholakia
0b15662c6e test: temporarily comment out doc test - fix ci/cd issue in separate pr 2024-11-26 13:52:40 +05:30
Krrish Dholakia
fd288c5081 test: fix test 2024-11-26 13:48:08 +05:30
Krrish Dholakia
195112565d test: fix documentation tests 2024-11-26 13:45:00 +05:30
Ishaan Jaff
8ec0e8cbc4 bump: version 1.52.15 → 1.52.16 2024-11-25 23:58:21 -08:00
Ishaan Jaff
c285132ad6
(docs) Simplify /vertex_ai/ pass through docs (#6910)
* simplify vertex pass through docs

* allow using known path for setting up pass throughs

* add unit testing for vtx pass through auth
2024-11-25 23:57:50 -08:00
Krrish Dholakia
d26ad42f86 docs(router_architecture.md): add router architecture docs 2024-11-26 12:54:38 +05:30
Ishaan Jaff
5c854650c2
(redis fix) - fix AbstractConnection.__init__() got an unexpected keyword argument 'ssl' (#6908)
* add better debugging for get_redis_connection_pool + allow passing ssl=None

* test_redis_with_ssl

* test_redis_with_ssl

* test_redis_with_ssl
2024-11-25 22:52:44 -08:00
Ishaan Jaff
552c0dd7a4
(fix) pass through endpoints - run logging async + use thread pool executor for sync logging callbacks (#6907)
* run pass through logging async

* fix use thread_pool_executor for pass through logging

* test_pass_through_request_logging_failure_with_stream

* fix anthropic pt logging test

* test_pass_through_request_logging_failure
2024-11-25 22:52:05 -08:00
Ishaan Jaff
d52aae4e82 ui new build 2024-11-25 22:42:59 -08:00
Ishaan Jaff
e952c666f3
(UI fix) UI does not reload when you login / open a new tab (#6909)
* store current page on url

* update menu history
2024-11-25 22:41:45 -08:00
Ishaan Jaff
c60261c3bc
(feat) Add support for using @google/generative-ai JS with LiteLLM Proxy (#6899)
* feat - allow using gemini js SDK with LiteLLM

* add auth for gemini_proxy_route

* basic local test for js

* test cost tagging gemini js requests

* add js sdk test for gemini with litellm

* add docs on gemini JS SDK

* run node.js tests

* fix google ai studio tests

* fix vertex js spend test
2024-11-25 13:13:03 -08:00
Ishaan Jaff
f77bf49772
feat - allow sending tags on vertex pass through requests (#6876)
* feat - allow tagging vertex JS SDK request

* add unit testing for passing headers for pass through endpoints

* fix allow using vertex_ai as the primary way for pass through vertex endpoints

* docs on vertex js pass tags

* add e2e test for vertex pass through with spend tags

* add e2e tests for streaming vertex JS with tags

* fix vertex ai testing
2024-11-25 12:12:09 -08:00
Ishaan Jaff
c73ce95c01
(feat) - provider budget improvements - ensure provider budgets work with multiple proxy instances + improve latency to ~90ms (#6886)
* 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

* add support for using in multi instance environments

* test_in_memory_redis_sync_e2e

* test_in_memory_redis_sync_e2e

* fix test_in_memory_redis_sync_e2e

* fix code quality check

* fix test provider budgets

* working provider budget tests

* add fixture for provider budget routing

* fix router testing for provider budgets

* add comments on provider budget routing

* use RedisPipelineIncrementOperation

* add redis async_increment_pipeline

* use redis async_increment_pipeline

* use lower value for testing

* use redis async_increment_pipeline

* use consistent key name for increment op

* add handling for budget windows

* fix typing async_increment_pipeline

* fix set attr

* add clear doc strings

* unit testing for provider budgets

* test_redis_increment_pipeline
2024-11-24 16:36:19 -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
e69678a9b3 update doc title 2024-11-23 16:25:00 -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
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
Ishaan Jaff
a6220f7a40 test - also try diff host for langfuse 2024-11-21 23:51:58 -08:00
Ishaan Jaff
701c154e35 fix test_aaateam_logging 2024-11-21 23:47:38 -08:00
Ishaan Jaff
8856256730 fix doc format 2024-11-21 23:29:40 -08:00
Ishaan Jaff
20f2bf4bbd bump: version 1.52.13 → 1.52.14 2024-11-21 23:19:02 -08:00
Ishaan Jaff
b903134cc9 ci/cd run again 2024-11-21 23:12:54 -08:00
Ishaan Jaff
952dbb9eb7 test_langfuse_masked_input_output 2024-11-21 22:59:36 -08:00
Ishaan Jaff
366a6895e2 test_langfuse_masked_input_output 2024-11-21 22:54:18 -08:00
Ishaan Jaff
be0f0dd345 test_langfuse_masked_input_output 2024-11-21 22:51:19 -08:00
Ishaan Jaff
027967d260 test_langfuse_logging_audio_transcriptions 2024-11-21 22:46:23 -08:00
Ishaan Jaff
f398c9b172 fix test_aaateam_logging 2024-11-21 22:36:44 -08:00
Ishaan Jaff
5a2e5b43c4 fix test_aaapass_through_endpoint_pass_through_keys_langfuse 2024-11-21 22:05:00 -08:00
Ishaan Jaff
e0921da38c test_team_logging 2024-11-21 22:01:12 -08:00
Ishaan Jaff
f77bd9a99c test_aaalangfuse_logging_metadata 2024-11-21 21:56:36 -08:00
Ishaan Jaff
14124bab45 docs - Send litellm_metadata (tags) 2024-11-21 21:46:49 -08:00