Commit graph

60 commits

Author SHA1 Message Date
Krish Dholakia
f79365df6e
LiteLLM Minor Fixes & Improvements (10/30/2024) (#6519)
* refactor: move gemini translation logic inside the transformation.py file

easier to isolate the gemini translation logic

* fix(gemini-transformation): support multiple tool calls in message body

Merges https://github.com/BerriAI/litellm/pull/6487/files

* test(test_vertex.py): add remaining tests from https://github.com/BerriAI/litellm/pull/6487

* fix(gemini-transformation): return tool calls for multiple tool calls

* fix: support passing logprobs param for vertex + gemini

* feat(vertex_ai): add logprobs support for gemini calls

* fix(anthropic/chat/transformation.py): fix disable parallel tool use flag

* fix: fix linting error

* fix(_logging.py): log stacktrace information in json logs

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

* fix(utils.py): fix mem leak for async stream + completion

Uses a global executor pool instead of creating a new thread on each request

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

* fix(factory.py): handle tool call + content in assistant message for bedrock

* fix: fix import

* fix(factory.py): maintain support for content as a str in assistant response

* fix: fix import

* test: cleanup test

* fix(vertex_and_google_ai_studio/): return none for content if no str value

* test: retry flaky tests

* (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>

* ui new build

* Add retry strat (#6520)

Signed-off-by: dbczumar <corey.zumar@databricks.com>

* (fix) slack alerting - don't spam the failed cost tracking alert for the same model  (#6543)

* fix use failing_model as cache key for failed_tracking_alert

* fix use standard logging payload for getting response cost

* fix  kwargs.get("response_cost")

* fix getting response cost

* (feat) add XAI ChatCompletion Support  (#6373)

* init commit for XAI

* add full logic for xai chat completion

* test_completion_xai

* docs xAI

* add xai/grok-beta

* test_xai_chat_config_get_openai_compatible_provider_info

* test_xai_chat_config_map_openai_params

* add xai streaming test

---------

Signed-off-by: dbczumar <corey.zumar@databricks.com>
Co-authored-by: Ishaan Jaff <ishaanjaffer0324@gmail.com>
Co-authored-by: Corey Zumar <39497902+dbczumar@users.noreply.github.com>
2024-11-02 00:44:32 +05:30
Krish Dholakia
e4dcd6f745
fix(navbar.tsx): only show 'get enterprise license' if user is not already a premium user (#5568) 2024-09-06 17:14:30 -07:00
Krrish Dholakia
3630896fde fix(team_endpoints.py): fix check 2024-07-16 22:05:48 -07:00
Krrish Dholakia
a4bea47a2d fix(router.py): log rejected router requests to langfuse
Fixes issue where rejected requests weren't being logged
2024-06-24 17:52:01 -07:00
Krrish Dholakia
9704e1cde0 test(test_alangfuse.py): fix test to flush in order 2024-06-20 10:22:15 -07:00
Krrish Dholakia
e66b3d264f fix(factory.py): handle bedrock claude image url's 2024-06-07 10:04:03 -07:00
Krrish Dholakia
52a2f5150c fix(utils.py): fix cost calculation for openai-compatible streaming object 2024-06-04 10:36:25 -07:00
Krrish Dholakia
3d18897d69 feat(router.py): enable filtering model group by 'allowed_model_region' 2024-05-08 22:10:17 -07:00
Krrish Dholakia
db666b01e5 feat(proxy_server.py): add CRUD endpoints for 'end_user' management
allow admin to specify region + default models for end users
2024-05-08 18:50:36 -07:00
Krish Dholakia
303e0c6226
Revert "* feat(factory.py): add support for merging consecutive messages of one role when separated with empty message of another role" 2024-05-07 21:42:18 -07:00
nkvch
389530efb4 * chore(.gitignore): add 'venv' to the list of ignored files/directories
* fix(test_completion.py): fix import order and remove unused imports
* feat(test_completion.py): add test for empty assistant message in completion_claude_3_empty_message()
2024-05-07 12:51:30 +02:00
Ishaan Jaff
df8e33739d
Revert "Add return_exceptions to litellm.batch_completion" 2024-05-04 13:01:17 -07:00
ffreemt
a7ec1772b1 Add litellm\tests\test_batch_completion_return_exceptions.py 2024-05-03 11:28:38 +08:00
Krrish Dholakia
160acc085a fix(router.py): fix default retry logic 2024-04-25 11:57:27 -07:00
Krrish Dholakia
bae6f41017 build(add-fallbacks-on-UI): allows admin to add fallbacks on the UI 2024-04-24 15:40:02 -07:00
Krrish Dholakia
76bd667b12 fix(caching.py): fix async batch redis get request 2024-04-10 21:37:45 -07:00
Krrish Dholakia
f4d34673d0 fix: update gitignore 2024-04-10 20:56:39 -07:00
Ishaan Jaff
9b7db7ea47 gitignore updates 2024-04-08 18:59:23 -07:00
Ishaan Jaff
1a96f52795 gitignore kub yaml 2024-04-08 18:30:28 -07:00
Daniel Fjeldstad
255dbdedff
Update .gitignore
Includes /node_modules
2024-04-02 21:31:57 +02:00
Debdut Chakraborty
7a1b3ca30d feat(helm-chart): redis as cache managed by chart 2024-03-10 01:53:28 +05:30
Lunik
880213d4a6
Refresh Helm chart structure
Signed-off-by: Lunik <lunik@tiwabbit.fr>
2024-02-16 22:59:14 +01:00
Krrish Dholakia
77fe71ee08 fix(utils.py): support together ai function calling 2024-02-05 15:30:44 -08:00
Shaun Maher
fb4c228c39 Merge upstream .gitignore changes 2024-01-30 09:38:54 +11:00
Shaun Maher
4d0e369e7a Authored a Helm chart for LiteLLM. Added GitHub workflows/actions to build and push the helm chart to the ghcr.io OCI registry. 2024-01-25 11:53:59 +11:00
ishaan-jaff
0c25d2e157 (chore) gitignore 2024-01-15 20:42:30 -08:00
Krrish Dholakia
a7245dba07 build(Dockerfile): fixes the build time setup 2024-01-06 16:41:37 +05:30
ishaan-jaff
357c6c56bd Revert "build(Dockerfile): move prisma build to dockerfile"
This reverts commit 2741835605.
2024-01-06 09:51:44 +05:30
Krrish Dholakia
2741835605 build(Dockerfile): move prisma build to dockerfile
Seems to solve - https://github.com/BerriAI/litellm/issues/1321
2024-01-05 19:03:41 +05:30
Krrish Dholakia
2070a785a4 feat(utils.py): support google kms for secret management
https://github.com/BerriAI/litellm/issues/1235
2023-12-26 15:39:40 +05:30
ishaan-jaff
7346b1638c (chore) gitignore langfuse.log 2023-12-26 09:09:32 +05:30
ishaan-jaff
b004cc05d3 (chore) gitignore langfuse.log 2023-12-26 09:08:16 +05:30
Krrish Dholakia
3923c389fd build(Dockerfile): fixing build requirements 2023-12-16 17:52:30 -08:00
Krrish Dholakia
4791dda66f feat(proxy_server.py): enable infinite retries on rate limited requests 2023-12-15 20:03:41 -08:00
ishaan-jaff
42bc170579 (chore) add dynamo.log to gitignore 2023-12-15 16:59:49 +05:30
ishaan-jaff
15b1e758ab (test) dynamo db writes 2023-12-15 16:43:33 +05:30
Krrish Dholakia
e7a7352f1b bump: version 1.12.6.dev5 → 1.12.6 2023-12-12 15:47:23 -08:00
Krrish Dholakia
6cb4ef5659 test(test_caching.py): reset cache values at the end of test 2023-12-11 18:10:53 -08:00
Krrish Dholakia
1f18093b63 test(test_custom_logger.py): reset cache test correctly 2023-12-11 17:41:47 -08:00
Krrish Dholakia
5a4c054eef fix(proxy_server.py): add testing for model info being added to /model/new 2023-12-02 14:15:45 -08:00
Krrish Dholakia
7b99cfe6b9 test(test_token_counter.py): include testing for function calls 2023-11-30 18:24:21 -08:00
Krrish Dholakia
c4aea7432f build: adding debug logs to gitignore 2023-11-27 22:05:07 -08:00
David Manouchehri
56d28ba69e
Don't commit .sam-aws. 2023-11-22 22:53:55 -05:00
Krrish Dholakia
8c104e9c6a fix(azure.py-+-proxy_server.py): fix function calling response object + support router on proxy 2023-11-15 13:15:16 -08:00
Krrish Dholakia
512a1637eb feat(completion()): enable setting prompt templates via completion() 2023-11-02 16:24:01 -07:00
Krrish Dholakia
aa57c63091 build(openai_proxy): docker build fixes 2023-10-25 13:34:04 -07:00
coconut49
5ab1312b62
Add '*.pyc' to .gitignore to ignore Python compiled files 2023-10-17 22:34:39 +08:00
coconut49
b8bde7350e
Add .idea/ directory to .gitignore to exclude IDE settings from version control. 2023-10-17 22:28:31 +08:00
Krrish Dholakia
2c0280cff3 fix(proxy_cli): add logs and config 2023-10-13 15:14:21 -07:00
Krrish Dholakia
606543eac8 fix(gitmodules): remapping to new proxy 2023-10-12 21:23:53 -07:00