Commit Graph
21124 Commits
Author SHA1 Message Date
Krish DholakiaandGitHub 62ad84fb64 UI (new_usage.tsx): Report 'total_tokens' + report success/failure calls (#9675)
* feat(internal_user_endpoints.py): return 'total_tokens' in `/user/daily/analytics`

* test(test_internal_user_endpoints.py): add unit test to assert spend metrics and dailyspend metadata always report the same fields

* build(schema.prisma): record success + failure calls to daily user table

allows understanding why model requests might exceed provider requests (e.g. user hit rate limit error)

* fix(internal_user_endpoints.py): report success / failure requests in API

* fix(proxy/utils.py): default to success

status can be missing or none at times for successful requests

* feat(new_usage.tsx): show success/failure calls on UI

* style(new_usage.tsx): ui cleanup

* fix: fix linting error

* fix: fix linting error

* feat(litellm-proxy-extras/): add new migration files
2025-03-31 22:48:43 -07:00
f2a7edaddc fix(proxy_server.py): Fix "Circular reference detected" error when max_parallel_requests = 0 (#9671)
* fix(proxy_server.py): remove non-functional parent backoff/retry on /chat/completion

Causes circular reference error

* fix(http_parsing_utils.py): safely return parsed body - don't allow mutation of cached request body by client functions

Root cause fix for circular reference error

* Revert "fix: Anthropic prompt caching on GCP Vertex AI (#9605)" (#9670)

This reverts commit a8673246dc.

* add type hints for AnthropicMessagesResponse

* define types for response form AnthropicMessagesResponse

* fix response typing

* allow using litellm.messages.acreate and litellm.messages.create

* fix anthropic_messages implementation

* add clear type hints to litellm.messages.create functions

* fix anthropic_messages

* working anthropic API tests

* fixes - anthropic messages interface

* use new anthropic interface

* fix code quality check

* docs anthropic messages endpoint

* add namespace_packages = True to mypy

* fix mypy lint errors

* docs anthropic messages interface

* test: fix unit test

* test(test_http_parsing_utils.py): update tests

---------

Co-authored-by: Ishaan Jaff <ishaanjaffer0324@gmail.com>
2025-03-31 22:06:02 -07:00
superpoussin22andGitHub 136f1d60b3 Update model_prices_and_context_window.json add gemini-2.5-pro-exp-03-25 (#9650)
* Update model_prices_and_context_window.json

add gemini-2.5-pro-exp-03-25

* Update model_prices_and_context_window.json

correct tokens limit
2025-03-31 21:31:30 -07:00
Krish DholakiaandGitHub ef88792ad3 Revert "Revert "Correct Databricks llama3.3-70b endpoint and add databricks c…" (#9676)
This reverts commit 1e26c594cb.
2025-03-31 21:30:50 -07:00
Krish DholakiaandGitHub 722f3ff0e6 fix(cost_calculator.py): allows checking received + sent model name when checking for cost calculation (#9669)
Fixes issue introduced by https://github.com/BerriAI/litellm/commit/dfb838eaff82301d4101d09982fbbb251bbc1ce1#r154667517
2025-03-31 21:29:48 -07:00
Krish DholakiaandGitHub 5ad2fbcba6 Openrouter streaming fixes + Anthropic 'file' message support (#9667)
* fix(openrouter/transformation.py): Handle error in openrouter stream

Fixes https://github.com/Aider-AI/aider/issues/3550

* test(test_openrouter_chat_transformation.py): add unit tests

* feat(anthropic/chat/transformation.py): add openai 'file' message content type support

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

* fix(factory.py): add bedrock converse support for openai 'file' message content type

Closes https://github.com/BerriAI/litellm/issues/9463
2025-03-31 21:22:59 -07:00
Ishaan JaffandGitHub bc5cc51b9d Merge pull request #9567 from BerriAI/litellm_anthropic_messages_improvements
[Refactor] - Expose litellm.messages.acreate() and  litellm.messages.create() to make LLM API calls in Anthropic API spec
v1.65.1-nightly
2025-03-31 20:50:30 -07:00
Krish DholakiaandGitHub 46b3dbde8f Revert "fix: Anthropic prompt caching on GCP Vertex AI (#9605)" (#9670)
This reverts commit a8673246dc.
2025-03-31 17:13:55 -07:00
Krrish Dholakia b37cb642c1 test: fix b64 str 2025-03-31 17:10:06 -07:00
Krrish Dholakia 611afaf2ab ci(test-linting.yml): update to run black formatting 2025-03-31 17:03:59 -07:00
Krish DholakiaandGitHub 1e26c594cb Revert "Correct Databricks llama3.3-70b endpoint and add databricks claude 3.…" (#9668)
This reverts commit dfb838eaff.
2025-03-31 17:02:21 -07:00
Ishaan Jaff d91bf3cc91 docs anthropic messages interface 2025-03-31 16:53:39 -07:00
Ishaan Jaff ceab3cfa7c fix mypy lint errors 2025-03-31 16:52:39 -07:00
Ishaan JaffandGitHub 0d48652012 Merge pull request #9515 from BerriAI/litellm_sagemaker_fix_stream
[Bug fix] -  Sagemaker endpoint with inference component streaming
2025-03-31 16:18:10 -07:00
Ishaan Jaff 3d0d5e1473 run black formatting 2025-03-31 16:12:31 -07:00
Ishaan JaffandGitHub f54105faf8 Merge pull request #9562 from KPCOFGS/main
Update all_caches.md
2025-03-31 16:06:44 -07:00
Ishaan JaffandGitHub 0719d399a7 Merge pull request #9581 from GabrielLoiseau/main
docs(gemini): fix typo
2025-03-31 16:06:10 -07:00
Ishaan Jaff ca4ed9ff2e ref issue 2025-03-31 16:05:10 -07:00
Ishaan Jaff bc66827537 test_aiter_bytes_valid_chunk_followed_by_unicode_error 2025-03-31 16:04:38 -07:00
Ishaan JaffandGitHub de9565dccf Merge pull request #9286 from colesmcintosh/xai-vision-model-docs-update
fix(docs): update xAI Grok vision model reference
2025-03-31 15:49:06 -07:00
Ishaan Jaff 43db2011cc add namespace_packages = True to mypy 2025-03-31 15:36:15 -07:00
Ishaan Jaff b8c0526b98 docs anthropic messages endpoint 2025-03-31 15:28:40 -07:00
Anton AbilovandGitHub dfb838eaff Correct Databricks llama3.3-70b endpoint and add databricks claude 3.7 sonnet endpoint (#9661) 2025-03-31 15:22:12 -07:00
Ishaan Jaff cfab8eec5b fix code quality check 2025-03-31 14:44:12 -07:00
Ishaan Jaff bd39a395f1 use new anthropic interface 2025-03-31 14:31:09 -07:00
Ishaan Jaff 01d85d5fb7 Merge branch 'main' into litellm_anthropic_messages_improvements 2025-03-31 14:22:56 -07:00
Ishaan Jaff 83ba96b8c6 Merge branch 'main' into litellm_sagemaker_fix_stream 2025-03-31 14:22:20 -07:00
Ishaan Jaff ce5f55d04e test fix update spend 2025-03-31 14:20:47 -07:00
Shixian ShengandGitHub 63e9ac5d04 Merge branch 'BerriAI:main' into main 2025-03-30 06:53:09 -04:00
Krrish Dholakia 17ad8a0417 docs: cleanup docs 2025-03-30 00:40:23 -07:00
Krrish Dholakia 69db775e73 docs(vertex.md): update docs to show 'file' message usage 2025-03-30 00:28:45 -07:00
SamandGitHub a8673246dc fix: Anthropic prompt caching on GCP Vertex AI (#9605)
* fix: Anthropic prompt caching on GCP Vertex AI

* test(vertex): anthropic prompt caching
2025-03-29 23:40:34 -07:00
jmarshall-medalliaandGitHub da953c74a1 Add password to sync sentinel client (#9622) 2025-03-29 23:38:54 -07:00
Ishaan Jaff 31082344a4 docs release notes 2025-03-29 23:08:20 -07:00
Ishaan Jaff df01337bd8 docs litellm mcp 2025-03-29 22:28:03 -07:00
Ishaan Jaff cc80370e0c docs mcp litellm 2025-03-29 21:59:58 -07:00
Ishaan Jaff 366f3a901c docs mcp 2025-03-29 21:46:18 -07:00
Ishaan Jaff db12adb3db docs mcp tools 2025-03-29 20:42:14 -07:00
Ishaan Jaff 2238a5585b doc fix mcp 2025-03-29 20:35:53 -07:00
Ishaan Jaff 8c2f1c6142 docs 1.65.0-stable 2025-03-29 20:03:05 -07:00
Ishaan Jaff 7673293c9f docs update stable release 2025-03-29 20:01:00 -07:00
Ishaan Jaff 9b187d89f2 add litellm model name on SLP 2025-03-29 19:55:41 -07:00
Ishaan Jaff 1f10d985fb docs updates release notes 2025-03-29 19:51:38 -07:00
Ishaan Jaff e9b743e3c6 docs release notes 2025-03-29 19:50:13 -07:00
Ishaan JaffandGitHub 5df985f964 Merge pull request #9642 from BerriAI/litellm_mcp_improvements_expose_sse_urls
[Feat] - MCP improvements, add support for using SSE MCP servers
2025-03-29 19:37:57 -07:00
Ishaan JaffandGitHub 19be617fe9 Merge pull request #9643 from BerriAI/litellm_docs_stable_release_notes
[Docs - Release notes v0] v1.65.0-stable
2025-03-29 19:27:59 -07:00
Krish DholakiaandGitHub 5c107c64dd Add gemini audio input support + handle special tokens in sagemaker response (#9640)
* fix(internal_user_endpoints.py): cleanup unused variables on beta endpoint

no team/org split on daily user endpoint

* build(model_prices_and_context_window.json): gemini-2.0-flash supports audio input

* feat(gemini/transformation.py): support passing audio input to gemini

* test: fix test

* fix(gemini/transformation.py): support audio input as a url

enables passing google cloud bucket urls

* fix(gemini/transformation.py): support explicitly passing format of file

* fix(gemini/transformation.py): expand support for inferred file types from url

* fix(sagemaker/completion/transformation.py): fix special token error when counting sagemaker tokens

* test: fix import
2025-03-29 19:23:09 -07:00
Ishaan Jaff f3b72858e8 docs release notes 2025-03-29 19:08:23 -07:00
Ishaan Jaff d04cc6c81e docs release notes 2025-03-29 19:03:55 -07:00
Ishaan Jaff 46e5ebe3c7 docs add mcp graphic to stable release notes 2025-03-29 19:00:26 -07:00