Commit Graph

210 Commits

Author SHA1 Message Date
Ishaan Jaff 1ce71d6d61 bump litellm-enterprise = {version = "0.1.11", optional = true} 2025-07-02 15:00:28 -07:00
Ishaan Jaff a021e7cb9d bump poetry 2025-06-28 21:16:52 -07:00
Krrish Dholakia 23018bd0a2 build(pyproject.toml): bump version 2025-06-26 07:58:29 -07:00
Ishaan Jaff 5b8e300150 [Feat] gemini-cli integration - Add Logging + Cost tracking for stream + non-stream Vertex / Google AI Studio routes (#12058)
* add google generate content to call types

* Revert "add google generate content to call types"

This reverts commit 6f57dde293e50674c8fca0feac6e01c27d9e1c96.

* add CallTypesLiteral for gemini

* allow passing model to vertexpass through logging handler

* update logging handler

* fix checking if stream

* add async streaming logging for vtx

* refactor _transform_google_generate_content_to_openai_model_response

* fix logging_obj

* fixes _handle_non_streaming_google_genai_generate_content_response_logging

* logging callback tests

* ruff check fixes

* test _is_streaming_request

* test_ensure_initialize_azure_sdk_client_always_used

* fix BaseGoogleGenAIGenerateContentStreamingIterator

* fix - linting errors

* req - add google-genai
2025-06-25 22:26:20 -07:00
Ishaan Jaff 35e46784d3 [Feat] Add Support for calling Gemini/Vertex models in their native format (#12046)
* init litellm google gen ai methods

* feat init structure of functions for generate content

* add init

* add BaseGoogleGenAIGenerateContentConfig

* add generate_content_handler

* add get_provider_google_genai_generate_content_config

* fixes for generate content

* add get_vertex_ai_project etc to base

* use VertexBase

* fixes for BaseGoogleGenAIGenerateContentConfig

* working validate env for google gemini

* feat - add transform google response

* fixes for transform_generate_content_request

* fix get_supported_generate_content_optional_params

* add BaseGoogleGenAITest

* working e2e test

* fixes init config

* use correct types

* fix test for google gen ai

* fix types

* add sync_get_auth_token_and_url

* fixes for transform

* add llm http handler for google

* working non-streaming google endpoints

* add BaseGoogleGenAIGenerateContentStreamingIterator

* add GoogleGenAIGenerateContentStreamingIterator

* fix working sync stream

* fixes for litellm logging obj

* working async streaming

* add google gen ai types

* fix - required imports

* fix readme

* fix deps

* fix deps

* fix ruff code QA checks

* fix linting

* fixes TYPE_CHECKING

* fixes for typing
2025-06-25 18:37:03 -07:00
Ishaan Jaff d4ba4900cf bump litellm enterprise 2025-06-23 19:36:31 -07:00
Ishaan Jaff 94a8ae393c bump litellm-enterprise-0.1.8 2025-06-21 16:00:36 -07:00
Rinor Maloku 35b791dc49 bumps the anthropic package (#11851) 2025-06-19 20:11:04 -07:00
Krrish Dholakia 753aeffe73 build: update with new migration file 2025-06-18 23:07:13 -07:00
Krrish Dholakia 39a1fbfb35 build: bump versions 2025-06-18 22:14:40 -07:00
Ishaan Jaff c233e86e45 rollback dd trace (#11736) 2025-06-14 15:52:29 -07:00
Ishaan Jaff 02b02c739b [Feat] MCP - Add support for streamablehttp_client MCP Servers (#11628)
* feat - add https mcp support

* fixes for MCP http integration

* fix code QA

* bump mcp dep

* test_mcp_server_manager_https_server

* test mcp server https

* fix linting error

* bump mcp in poetry

* fix import streamablehttp_client

* fix streamablehttp_client

* fix streamablehttp_client

* add streamablehttp_client
2025-06-11 17:09:46 -07:00
Ishaan Jaff 02a34d319a bump to ddtrace==3.8.0 (#11426) 2025-06-04 22:18:07 -07:00
Krrish Dholakia 0273b72b68 build: bump poetry 2025-06-03 21:25:53 -07:00
Ishaan Jaff afb75dc50c bump: bump litellm enterprise 2025-05-29 20:41:03 -07:00
Ishaan Jaff 9e75409518 bump litellm proxy extras 2025-05-28 18:58:33 -07:00
Krrish Dholakia 95de41d10c build: publish new litellm-proxy-extras file 2025-05-27 17:44:23 -07:00
Ishaan Jaff 1876b3ae35 [Fix] Rollback to httpx==0.27.0 (#11146)
* fix - fix - use old httpx version

* fix - fix - use old httpx version

* fix: test

* fix: comment
2025-05-26 10:44:11 -07:00
Krrish Dholakia d14af20bbd build: bump litellm-enterprise version - cleanup prints 2025-05-24 11:31:42 -07:00
Ishaan Jaff 86cdb8382b [Feat] Use aiohttp transport by default - 97% lower median latency (#11097)
* fix: add flag for disabling use_aiohttp_transport

* feat: add _create_async_transport

* feat: fixes for transport

* add httpx-aiohttp

* feat: fixes for transport

* refactor: fixes for transport

* build: fix deps

* fixes: test fixes

* fix: ensure aiohttp does not auto set content type

* test: test fixes

* feat: add LiteLLMAiohttpTransport

* fix: fixes for responses API handling

* test: fixes for responses API handling

* test: fixes for responses API handling

* feat: fixes for transport

* fix: base embedding handler

* test: test_async_http_handler_force_ipv4

* test: fix failing deepeval test

* fix: add YARL for bedrock urls

* fix: issues with transport

* fix: comment out linting issues

* test fix

* test: XAI is unstable

* test: fixes for using respx

* test: XAI fixes

* test: XAI fixes

* test: infinity testing fixes

* docs(config_settings.md): document param

* test: test_openai_image_edit_litellm_sdk

* test: remove deprecated test

* bump respx==0.22.0

* test: test_xai_message_name_filtering

* test: fix anthropic test after bumping httpx

* use n 4 for mapped tests (#11109)

* fix: use 1 session per event loop

* test: test_client_session_helper

* fix: linting error

* fix: resolving GET requests on httpx 0.28.1

* test fixes proxy unit tests

* fix: add ssl verify settings

* fix: proxy unit tests

* fix: refactor

* tests: basic unit tests for aiohttp transports

* tests: fixes xai

---------

Co-authored-by: Krrish Dholakia <krrishdholakia@gmail.com>
2025-05-23 22:55:35 -07:00
Krrish Dholakia 42c1d932f9 bump: version 0.1.21 → 0.2.0 2025-05-23 21:32:38 -07:00
Ishaan Jaff dd4a65b83a Feat: add MCP to Responses API and bump openai python sdk (#11029)
* feat: add MCP to responses API

* feat: bump openai version to 1.75.0

* docs MCP + responses API

* fixes: type checking

* fixes: type checking

* build: use latest openai 1.81.0

* fix: linting error

* fix: linting error

* fix: test

* fix: linting errors

* fix: test

* fix: test

* fix: linting

* Revert "fix: linting"

This reverts commit ebb19ff8cb1f8fcc3e224390e351676daccb33de.

* fix: linting
2025-05-22 07:24:10 -07:00
Ishaan Jaff 7075168939 bump: litellm proxy extras 2025-05-19 15:40:24 -07:00
Ishaan Jaff 22aa33e8b5 bump litellm_enterprise-0.1.4 2025-05-17 17:28:59 -07:00
Ishaan Jaff 19b2d70732 bump litellm_enterprise-0.1.3.tar.gz 2025-05-14 17:55:03 -07:00
Ishaan Jaff a30c574f9a bump litellm_proxy_extras-0.1.21.tar.gz 2025-05-14 17:53:34 -07:00
Ishaan Jaff b1fae09a7c bump litellm enterprise 0.1.2 2025-05-10 17:40:42 -07:00
Ishaan Jaff 4dfa913306 bump litellm proxy extras 2025-05-10 17:38:41 -07:00
Krrish Dholakia 10e80f0742 build(pyproject.toml): publish new litellm-proxy-extras version 2025-05-10 15:24:32 -07:00
Ishaan Jaff 3731ee436a [Refactor] Use pip package for enterprise/ folder (#10709)
* init enterprise pip

* init enterprise pip

* init enterprise pip

* test: enterprise pip

* add litellm-enterprise to pip

* litellm ent check

* litellm ent check

* fix import email router

* fix setup_litellm_enterprise_pip

* fix local testing with enterprise pip
2025-05-09 17:18:48 -07:00
Ishaan Jaff c50abd3254 bump litellm proxy extras 2025-05-09 14:18:21 -07:00
Ishaan Jaff 5886b96135 bump litellm proxy extras 2025-05-08 16:23:45 -07:00
Ishaan Jaff 764e9a1934 bump litellm proxy extras 2025-05-07 21:23:05 -07:00
Ishaan Jaff 7d73ab5d88 Add litellm-proxy CLI (#10478) (#10578)
* Add `litellm-proxy` CLI (#10478)

* First cut at a Python client module for proxy

* Add UnauthorizedError + add_model method

* Add delete_model method

* Add example model_id to delete_model docstring

* Make delete_model raise NotFoundError

* Add get_model

* Add get_all_model_info

* Rename models.list_models to models.list

* Rename models.get_all_model_info to models.info

* Move ModelsManagementClient.get_all_model_group_info to ModelGroupsManagementClient.info

* Rename get_model to get

* Rename add_model to new

* Rename delete_model to delete

* In client classes, rename base_url attribute to _base_url and api_key attribute to _api_key

* Add ModelsManagementClient.updae method

* Add client.chat.completions (ChatClient)

* ruff format litellm/proxy/client

* ruff format tests/litellm/proxy/client/*.py

* Add latest changes

* Rename KeysManagementClient.create to KeysManagementClient.generate

* Add new parameters to KeysManagementClient.generate

* Add CredentialsManagementClient

* Remove api_key parameter from KeysManagementClient.generate

* Fix lint errors

* Add litellm/proxy/client/README.md

* README.md: Remove api_key param to client.keys.generate

* Fix mypy errors

* First cut at litellm-proxy cli

* Add test for `litellm-proxy models list`

* Nicer get_models_info

* get_models_info: --columns option

* Use format_timestamp in list_models

* ruff format litellm/proxy/client

* Simpler JSON printing with rich.print_json

* Move models-related commands to separate file

From `cli.py` to `groups/models.py`

* Improve directory structure

* Cleanup cli/groups/models.py - esp. usage of rich

* Refactoring

* Refactor mocking in cli/test_main.py

* Dedup models commands tests

* Update poetry.lock

* Fix mypy errors

* ruff format litellm/proxy/client/cli

* ruff format tests/litellm/proxy/client/*.py

* Fix timezone issue in test_models_list_table_format

* Add cli/README.md

* Small README.md tweaks

* README.md enhancements

* Add credentials commands

* Add chat commands

* Add http commands

* ruff format litellm/proxy/client/cli

* Fix lint errors in credentials and http commands

* json => json_lib

* test-key => sk-test-key

* Mock HTTP responses so http command tests pass

* Fix mypy error in credentials.py

* bump: version 1.67.5 → 1.67.6

* build: update litellm version

* cli/main.py: show_envvar=True

* Increase test job timeout to 8 minutes

because it looks like maybe the job is getting canceled because it takes
too long with the additional tests?

This probably could be reverted once #10484 is merged, since that speeds
up pytest runs greatly.

* Add keys functionality to library/CLI

* Add info about keys commands to litellm/proxy/client/cli/README.md

* Move Model Information section in CLI README

* Make Model Information a level 4 heading

* Move rich to extras

as suggested by @ishaan-jaff

---------

Co-authored-by: Krrish Dholakia <krrishdholakia@gmail.com>

* pin rich=13.7.1

---------

Co-authored-by: Marc Abramowitz <abramowi@adobe.com>
Co-authored-by: Krrish Dholakia <krrishdholakia@gmail.com>
2025-05-05 21:29:57 -07:00
Ishaan Jaff 9cf2a95640 bump litellm proxy extras 2025-05-03 09:30:10 -07:00
Krrish Dholakia 4ab0ee0b65 test: more testing fixes 2025-05-01 15:36:13 -07:00
Ishaan Jaff 42928601b4 bump litellm-proxy-extras 2025-04-26 18:11:06 -07:00
Ishaan Jaff c114da1c6d bump litellm proxy extras 2025-04-26 07:46:33 -07:00
Ishaan Jaff db4ebe10c8 bump litellm-proxy-extras 2025-04-19 09:14:33 -07:00
Ishaan Jaff 2b14978d9d bump litellm proxy extras 2025-04-16 19:28:16 -07:00
Ishaan Jaff a9e8a36f89 [Bug Fix] Azure Blob Storage fixes (#10059)
* Simple fix for #9339 - upgrade the underlying library and cache the azure storage client (#9965)

* fix -  use constants for caching azure storage client

---------

Co-authored-by: Adrian Lyjak <adrian@chatmeter.com>
2025-04-16 09:47:10 -07:00
Ishaan Jaff ca593e003a bump litellm-proxy-extras==0.1.9 2025-04-15 22:49:24 -07:00
Krish Dholakia 9b77559ccf Add aggregate team based usage logging (#10039)
* feat(schema.prisma): initial commit adding aggregate table for team spend

allows team spend to be visible at 1m+ logs

* feat(db_spend_update_writer.py): support logging aggregate team spend

allows usage dashboard to work at 1m+ logs

* feat(litellm-proxy-extras/): add new migration file

* fix(db_spend_update_writer.py): fix return type

* build: bump requirements

* fix: fix ruff error
2025-04-15 20:58:48 -07:00
Krrish Dholakia 0853b89864 build: use new litellm-proxy-extras version 2025-04-12 10:55:47 -07:00
Ishaan Jaff fb0c3d9e18 [DB / Infra] Add new column team_member_permissions (#9941)
* add team_member_permissions to team table

* add migration.sql file

* fix poetry lock

* fix prisma migrations

* fix poetry lock

* fix migration
2025-04-12 09:06:04 -07:00
Krish Dholakia 421e0a3004 Litellm add managed files db (#9930)
* fix(openai.py): ensure openai file object shows up on logs

* fix(managed_files.py): return unified file id as b64 str

allows retrieve file id to work as expected

* fix(managed_files.py): apply decoded file id transformation

* fix: add unit test for file id + decode logic

* fix: initial commit for litellm_proxy support with CRUD Endpoints

* fix(managed_files.py): support retrieve file operation

* fix(managed_files.py): support for DELETE endpoint for files

* fix(managed_files.py): retrieve file content support

supports retrieve file content api from openai

* fix: fix linting error

* test: update tests

* fix: fix linting error

* feat(managed_files.py): support reading / writing files in DB

* feat(managed_files.py): support deleting file from DB on delete

* test: update testing

* fix(spend_tracking_utils.py): ensure each file create request is logged correctly

* fix(managed_files.py): fix storing / returning managed file object from cache

* fix(files/main.py): pass litellm params to azure route

* test: fix test

* build: add new prisma migration

* build: bump requirements

* test: add more testing

* refactor: cleanup post merge w/ main

* fix: fix code qa errors
2025-04-12 08:24:46 -07:00
Krish Dholakia ac4f32fb1e Cost tracking for gemini-2.5-pro (#9837)
* build(model_prices_and_context_window.json): add google/gemini-2.0-flash-lite-001 versioned pricing

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

* build(model_prices_and_context_window.json): add initial support for 'supported_output_modalities' param

* build(model_prices_and_context_window.json): add initial support for 'supported_output_modalities' param

* build(model_prices_and_context_window.json): add supported endpoints to gemini-2.5-pro

* build(model_prices_and_context_window.json): add gemini 200k+ pricing

* feat(utils.py): support cost calculation for gemini-2.5-pro above 200k tokens

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

* build: test dockerfile change

* build: revert apk change

* ci(config.yml): pip install wheel

* ci: test problematic package first

* ci(config.yml): pip install only binary

* ci: try more things

* ci: test different ml_dtypes version

* ci(config.yml): check ml_dtypes==0.4.0

* ci: test

* ci: cleanup config.yml

* ci: specify ml dtypes in requirements.txt

* ci: remove redisvl depedency (temporary)

* fix: fix linting errors

* test: update test

* test: fix test
2025-04-09 18:48:43 -07:00
Ishaan Jaff 357f081d1c fix mldtypes dep 2025-04-08 17:25:28 -07:00
Ishaan Jaff 9f33e9b3e8 pin ml-dtypes==0.4.0 2025-04-08 17:24:08 -07:00
Krish Dholakia d4d3c4f697 build: bump litellm-proxy-extras version (#9771) 2025-04-05 09:02:52 -07:00