Commit graph

197 commits

Author SHA1 Message Date
Krrish Dholakia
ea96eebe85 refactor: move all testing to top-level of repo
Closes https://github.com/BerriAI/litellm/issues/486
2024-09-28 21:08:14 -07:00
Ishaan Jaff
db59ac93cb fix test_vertexai_multimodal_embedding_base64image_in_input 2024-09-27 20:17:08 -07:00
Ishaan Jaff
1d5da3212f [Vertex Multimodal embeddings] Fixes to work with Langchain OpenAI Embedding (#5949)
* fix parallel request limiter - use one cache update call

* ci/cd run again

* run ci/cd again

* use docker username password

* fix config.yml

* fix config

* fix config

* fix config.yml

* ci/cd run again

* use correct typing for batch set cache

* fix async_set_cache_pipeline

* fix only check user id tpm / rpm limits when limits set

* fix test_openai_azure_embedding_with_oidc_and_cf

* add InstanceImage type

* fix vertex image transform

* add langchain vertex test request

* add new vertex test

* update multimodal embedding tests

* add test_vertexai_multimodal_embedding_base64image_in_input

* simplify langchain mm embedding usage

* add langchain example for multimodal embeddings on vertex

* fix linting error
2024-09-27 18:04:03 -07:00
Krish Dholakia
d6ca7fed18 LiteLLM Minor Fixes & Improvements (09/20/2024) (#5807)
* fix(vertex_llm_base.py): Handle api_base = ""

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

* fix(o1_transformation.py): handle stream_options not being supported

https://github.com/BerriAI/litellm/issues/5803

* docs(routing.md): fix docs

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

* perf(internal_user_endpoints.py): reduce db calls for getting team_alias for a key

Use the list gotten earlier in `/user/info` endpoint

 Reduces ui keys tab load time to 800ms (prev. 28s+)

* feat(proxy_server.py): support CONFIG_FILE_PATH as env var

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

* feat(get_llm_provider_logic.py): add `litellm_proxy/` as a known openai-compatible route

simplifies calling litellm proxy

Reduces confusion when calling models on litellm proxy from litellm sdk

* docs(litellm_proxy.md): cleanup docs

* fix(internal_user_endpoints.py): fix pydantic obj

* test(test_key_generate_prisma.py): fix test
2024-09-20 20:21:32 -07:00
Ishaan Jaff
7528624d0b fix gemini 1.5 flash test 2024-09-16 19:37:41 -07:00
Ishaan Jaff
97f3f14ea7 fix gemini 1.5 flash supports_response_schema 2024-09-16 17:59:59 -07:00
Krish Dholakia
713d762411 LiteLLM Minor Fixes and Improvements (09/13/2024) (#5689)
* refactor: cleanup unused variables + fix pyright errors

* feat(health_check.py): Closes https://github.com/BerriAI/litellm/issues/5686

* fix(o1_reasoning.py): add stricter check for o-1 reasoning model

* refactor(mistral/): make it easier to see mistral transformation logic

* fix(openai.py): fix openai o-1 model param mapping

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

* feat(main.py): infer finetuned gemini model from base model

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

* docs(vertex.md): update docs to call finetuned gemini models

* feat(proxy_server.py): allow admin to hide proxy model aliases

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

* docs(load_balancing.md): add docs on hiding alias models from proxy config

* fix(base.py): don't raise notimplemented error

* fix(user_api_key_auth.py): fix model max budget check

* fix(router.py): fix elif

* fix(user_api_key_auth.py): don't set team_id to empty str

* fix(team_endpoints.py): fix response type

* test(test_completion.py): handle predibase error

* test(test_proxy_server.py): fix test

* fix(o1_transformation.py): fix max_completion_token mapping

* test(test_image_generation.py): mark flaky test
2024-09-14 10:02:55 -07:00
Krish Dholakia
dec53961f7 LiteLLM Minor Fixes and Improvements (11/09/2024) (#5634)
* fix(caching.py): set ttl for async_increment cache

fixes issue where ttl for redis client was not being set on increment_cache

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

* fix(caching.py): fix increment cache w/ ttl for sync increment cache on redis

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

* fix(router.py): support adding retry policy + allowed fails policy via config.yaml

* fix(router.py): don't cooldown single deployments

No point, as there's no other deployment to loadbalance with.

* fix(user_api_key_auth.py): support setting allowed email domains on jwt tokens

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

* docs(token_auth.md): add user upsert + allowed email domain to jwt auth docs

* fix(litellm_pre_call_utils.py): fix dynamic key logging when team id is set

Fixes issue where key logging would not be set if team metadata was not none

* fix(secret_managers/main.py): load environment variables correctly

Fixes issue where os.environ/ was not being loaded correctly

* test(test_router.py): fix test

* feat(spend_tracking_utils.py): support logging additional usage params - e.g. prompt caching values for deepseek

* test: fix tests

* test: fix test

* test: fix test

* test: fix test

* test: fix test
2024-09-11 22:36:06 -07:00
Ishaan Jaff
36fe499d53 fix vtx test 2024-09-11 14:17:03 -07:00
Ishaan Jaff
64fab8a56b fix test get token url 2024-09-10 17:38:03 -07:00
Krish Dholakia
355f4a7c90 LiteLLM Minor Fixes and Improvements (#5537)
* fix(vertex_ai): Fixes issue where multimodal message without text was failing vertex calls

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

* fix(azure.py): move to using httphandler for oidc token calls

Fixes issue where ssl certificates weren't being picked up as expected

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

* feat: Allows admin to set a default_max_internal_user_budget in config, and allow setting more specific values as env vars

* fix(proxy_server.py): fix read for max_internal_user_budget

* build(model_prices_and_context_window.json): add regional gpt-4o-2024-08-06 pricing

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

* test: skip re-test
2024-09-05 18:03:34 -07:00
Krish Dholakia
8eb7cb5300 LiteLLM Minor fixes + improvements (08/03/2024) (#5488)
* fix(internal_user_endpoints.py): set budget_reset_at for /user/update

* fix(vertex_and_google_ai_studio_gemini.py): handle accumulated json

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

* fix(vertex_ai_and_gemini.py): fix assistant message function call when content is not None

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

* fix(proxy_server.py): generic state uuid for okta sso

* fix(lago.py): improve debug logs

Debugging for https://github.com/BerriAI/litellm/issues/5477

* docs(bedrock.md): add bedrock cross-region inferencing to docs

* fix(azure.py): return azure response headers on aembedding call

* feat(azure.py): return azure response headers for `/audio/transcription`

* fix(types/utils.py): standardize deepseek / anthropic prompt caching usage information

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

* docs(usage.md): add docs on litellm usage object

* test(test_completion.py): mark flaky test
2024-09-03 21:21:34 -07:00
Krish Dholakia
e12bd3e548 Minor LiteLLM Fixes and Improvements (#5456)
* fix(utils.py): support 'drop_params' for embedding requests

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

* feat(vertex_ai_non_gemini.py): support function param in messages

* test: skip test - model end of life

* fix(vertex_ai_non_gemini.py): fix gemini history parsing
2024-08-31 17:58:10 -07:00
Ishaan Jaff
99bb817b7f fix test_vertexai_embedding_embedding_latest_input_type 2024-08-30 15:57:44 -07:00
Ishaan Jaff
ea12519b98 fix map input_type to task_type for vertex ai 2024-08-30 12:09:07 -07:00
Ishaan Jaff
0866deea97 Merge pull request #5439 from BerriAI/litellm_use_correct_ai21_pricing
[Fix] Use correct Vertex AI AI21 Cost tracking
2024-08-30 10:49:42 -07:00
Ishaan Jaff
10771e3bde add test for test_vertexai_multimodal_embedding_text_input 2024-08-30 09:19:48 -07:00
Ishaan Jaff
40d40e87fb add tests to check ai21 models cost is calculated correct 2024-08-30 07:30:16 -07:00
Krish Dholakia
20fcd8ebdf fix(google_ai_studio): working context caching (#5421)
* fix(google_ai_studio): working context caching

* feat(vertex_ai_context_caching.py): support async cache check calls

* fix(vertex_and_google_ai_studio_gemini.py): fix setting headers

* fix(vertex_ai_parter_models): fix import

* fix(vertex_and_google_ai_studio_gemini.py): fix input

* test(test_amazing_vertex_completion.py): fix test
2024-08-29 07:00:30 -07:00
Krrish Dholakia
fff9828801 test(test_amazing_vertex_completion.py): fix test 2024-08-28 21:12:39 -07:00
Krish Dholakia
0e0db9a5af Merge branch 'main' into litellm_main_staging 2024-08-28 18:05:27 -07:00
Ishaan Jaff
06385e7b4f fix vertex ai test 2024-08-28 15:30:39 -07:00
Ishaan Jaff
1f4ddd2937 fix failing vertex test 2024-08-28 14:46:57 -07:00
Krrish Dholakia
055f8a511f test(test_amazing_vertex_completion.py): update test to not pick experimental gemini models 2024-08-28 14:28:06 -07:00
Krish Dholakia
996c028127 Merge pull request #5393 from BerriAI/litellm_gemini_embedding_support
feat(vertex_ai_and_google_ai_studio): Support Google AI Studio Embedding Endpoint
2024-08-28 13:46:28 -07:00
Ishaan Jaff
e7cdf35f2d mark vertex tests as flaky 2024-08-28 08:32:33 -07:00
Ishaan Jaff
45366a260c mark test as flaky 2024-08-28 08:24:04 -07:00
Krrish Dholakia
de5617ce66 feat(vertex_ai_and_google_ai_studio): Support Google AI Studio Embeddings endpoint
Closes https://github.com/BerriAI/litellm/issues/5385
2024-08-27 16:53:11 -07:00
Ishaan Jaff
2436dfbbc0 add mock test for ai21 2024-08-27 14:42:13 -07:00
Ishaan Jaff
c634c3c5b7 add test for test_partner_models_httpx_ai21 2024-08-27 13:36:47 -07:00
Krrish Dholakia
fe6ba2d025 fix: fix imports 2024-08-26 22:19:01 -07:00
Krrish Dholakia
b277086cf7 feat(vertex_ai_context_caching.py): check gemini cache, if key already exists 2024-08-26 22:19:01 -07:00
Krrish Dholakia
074e30fa10 feat(vertex_ai_context_caching.py): support making context caching calls to vertex ai in a normal chat completion call (anthropic caching format)
Closes https://github.com/BerriAI/litellm/issues/5213
2024-08-26 22:19:01 -07:00
Ishaan Jaff
1b9a476b98 add test for test_completion_fine_tuned_model 2024-08-26 13:26:56 -07:00
Krish Dholakia
bc2a96b2a5 Merge branch 'main' into litellm_vertex_migration 2024-08-24 18:24:19 -07:00
Ishaan Jaff
e45ec0ef46 fix test_vertexai_multimodal_embedding use magicMock requests 2024-08-22 09:56:24 -07:00
Krrish Dholakia
e117a041ff test: fix test 2024-08-21 22:30:41 -07:00
Krrish Dholakia
8c56ce0a1f test(test_amazing_vertex_completion.py): handle vertex api instability 2024-08-21 17:09:17 -07:00
Ishaan Jaff
e4fe5924a5 Merge pull request #5326 from BerriAI/litellm_Add_vertex_multimodal_embedding
[Feat] add vertex multimodal embedding support
2024-08-21 17:06:43 -07:00
Ishaan Jaff
1d627aa325 fix test test_vertexai_multimodal_embedding 2024-08-21 15:25:13 -07:00
Krrish Dholakia
664c40a4c7 fix(vertex_httpx.py): fix json schema call to pass in response_mime_type=="application/json" 2024-08-21 15:24:04 -07:00
Ishaan Jaff
a0e14af1d3 feat add multimodal embeddings on vertex 2024-08-21 15:19:48 -07:00
Ishaan Jaff
0435101df4 add multi modal vtx embedding 2024-08-21 15:05:59 -07:00
Krish Dholakia
0916197c9d Merge pull request #5244 from BerriAI/litellm_better_error_logging_sentry
refactor: replace .error() with .exception() logging for better debugging on sentry
2024-08-16 19:16:20 -07:00
Ishaan Jaff
5790275de5 skip InternalServerError on vertex test 2024-08-16 14:51:51 -07:00
Krrish Dholakia
2874b94fb1 refactor: replace .error() with .exception() logging for better debugging on sentry 2024-08-16 09:22:47 -07:00
Ishaan Jaff
ee39f65baa add tests to make sure correct vertex ai route is used 2024-08-08 11:28:19 -07:00
Krrish Dholakia
4707861ee4 test(test_amazing_vertex_completion.py): fix test for json schema validation in openai schema 2024-08-07 18:39:20 -07:00
Krrish Dholakia
831dc1b886 feat: Translate openai 'response_format' json_schema to 'response_schema' for vertex ai + google ai studio
Closes https://github.com/BerriAI/litellm/issues/5074
2024-08-06 19:06:14 -07:00
Krrish Dholakia
1527f2bd80 feat(vertex_httpx.py): Support gemini 'response_schema' param
Fixes https://github.com/BerriAI/litellm/pull/3366#issuecomment-2269183338
2024-08-05 07:56:44 -07:00