Commit graph

547 commits

Author SHA1 Message Date
Krish Dholakia
d58fe5a9f9 Add OpenAI gpt-4o-transcribe support (#9517)
* refactor: introduce new transformation config for gpt-4o-transcribe models

* refactor: expose new transformation configs for audio transcription

* ci: fix config yml

* feat(openai/transcriptions): support provider config transformation on openai audio transcriptions

allows gpt-4o and whisper audio transformation to work as expected

* refactor: migrate fireworks ai + deepgram to new transform request pattern

* feat(openai/): working support for gpt-4o-audio-transcribe

* build(model_prices_and_context_window.json): add gpt-4o-transcribe to model cost map

* build(model_prices_and_context_window.json): specify what endpoints are supported for `/audio/transcriptions`

* fix(get_supported_openai_params.py): fix return

* refactor(deepgram/): migrate unit test to deepgram handler

* refactor: cleanup unused imports

* fix(get_supported_openai_params.py): fix linting error

* test: update test
2025-03-26 23:10:25 -07:00
Krish Dholakia
9c083e7d2c Support Gemini audio token cost tracking + fix openai audio input token cost tracking (#9535)
* fix(vertex_and_google_ai_studio_gemini.py): log gemini audio tokens in usage object

enables accurate cost tracking

* refactor(vertex_ai/cost_calculator.py): refactor 128k+ token cost calculation to only run if model info has it

Google has moved away from this for gemini-2.0 models

* refactor(vertex_ai/cost_calculator.py): migrate to usage object for more flexible data passthrough

* fix(llm_cost_calc/utils.py): support audio token cost tracking in generic cost per token

enables vertex ai cost tracking to work with audio tokens

* fix(llm_cost_calc/utils.py): default to total prompt tokens if text tokens field not set

* refactor(llm_cost_calc/utils.py): move openai cost tracking to generic cost per token

more consistent behaviour across providers

* test: add unit test for gemini audio token cost calculation

* ci: bump ci config

* test: fix test
2025-03-26 17:26:25 -07:00
Krish Dholakia
7873080223 Nova Canvas complete image generation tasks (#9177) (#9525)
* Nova Canvas complete image generation tasks (#9177)

* add initial support for Amazon Nova Canvas model

Signed-off-by: omrishiv <327609+omrishiv@users.noreply.github.com>

* adjust name to AmazonNovaCanvas and map function variables to config

Signed-off-by: omrishiv <327609+omrishiv@users.noreply.github.com>

* tighten model name check

Signed-off-by: omrishiv <327609+omrishiv@users.noreply.github.com>

* fix quality mapping

Signed-off-by: omrishiv <327609+omrishiv@users.noreply.github.com>

* add premium quality in config

Signed-off-by: omrishiv <327609+omrishiv@users.noreply.github.com>

* support all Amazon Nova Canvas tasks

* remove unused import

Signed-off-by: omrishiv <327609+omrishiv@users.noreply.github.com>

* add tests for image generation tasks and fix payload

Signed-off-by: omrishiv <327609+omrishiv@users.noreply.github.com>

* add missing util file

Signed-off-by: omrishiv <327609+omrishiv@users.noreply.github.com>

* update model prices backup file

Signed-off-by: omrishiv <327609+omrishiv@users.noreply.github.com>

* remove image tasks other than text->image

Signed-off-by: omrishiv <327609+omrishiv@users.noreply.github.com>

* add color guided generation task for Nova Canvas

Signed-off-by: omrishiv <327609+omrishiv@users.noreply.github.com>

* fix merge

Signed-off-by: omrishiv <327609+omrishiv@users.noreply.github.com>

* add nova canvas image generation documentation

Signed-off-by: omrishiv <327609+omrishiv@users.noreply.github.com>

* add nova canvas unit tests

Signed-off-by: omrishiv <327609+omrishiv@users.noreply.github.com>

---------

Signed-off-by: omrishiv <327609+omrishiv@users.noreply.github.com>
Co-authored-by: Krish Dholakia <krrishdholakia@gmail.com>

* ci(config.yml): bump ci config

* test: fix test

---------

Signed-off-by: omrishiv <327609+omrishiv@users.noreply.github.com>
Co-authored-by: omrishiv <327609+omrishiv@users.noreply.github.com>
2025-03-26 11:28:20 -07:00
Ishaan Jaff
c6424d6246 Merge branch 'main' into litellm_exp_mcp_server 2025-03-24 19:03:56 -07:00
Ishaan Jaff
f133bb07d1 fix pydantic import error 2025-03-24 07:11:48 -07:00
Ishaan Jaff
d932206bfb Merge branch 'main' into litellm_exp_mcp_server 2025-03-22 18:51:25 -07:00
Ishaan Jaff
f03f3c3d9a test_langfuse_logging_completion 2025-03-22 18:09:04 -07:00
Ishaan Jaff
4fb3fb3dff FileSearchTool 2025-03-22 17:56:14 -07:00
Ishaan Jaff
93a2b00c93 fix StandardBuiltInToolsParams 2025-03-22 17:53:06 -07:00
Ishaan Jaff
cf01f49893 fixes for web search cost tracking 2025-03-22 16:56:32 -07:00
Ishaan Jaff
8aa13bf632 WebSearchOptions 2025-03-22 15:39:04 -07:00
Ishaan Jaff
01df7a49e5 add WebSearchOptions as supported chat completion param 2025-03-22 15:37:34 -07:00
Ishaan Jaff
02c5aebc87 search_context_cost_per_query 2025-03-22 14:52:58 -07:00
Ishaan Jaff
2d05ee2a8b fix supports_web_search 2025-03-22 14:02:51 -07:00
Ishaan Jaff
13bfe7d518 Add annotations to the delta 2025-03-22 11:38:30 -07:00
Ishaan Jaff
69da0ed3b5 feat - add openai web search 2025-03-22 10:43:35 -07:00
Ishaan Jaff
616c4db12d add litellm mcp endpoints 2025-03-20 21:12:56 -07:00
Ishaan Jaff
2581797cf7 load load_tools_from_config 2025-03-20 17:36:17 -07:00
Ishaan Jaff
63d454bb8d add MCPToolRegistry 2025-03-20 17:22:12 -07:00
Krrish Dholakia
dcbe5df98b fix(types/utils.py): support openai 'file' message type
Closes https://github.com/BerriAI/litellm/issues/9365
2025-03-19 23:13:51 -07:00
Ishaan Jaff
43eedf26f7 Merge branch 'main' into litellm_arize_dynamic_logging 2025-03-18 22:13:35 -07:00
Krrish Dholakia
3ba0df484e fix(lowest_tpm_rpm_v2.py): fix updating limits 2025-03-18 17:10:17 -07:00
Ishaan Jaff
c153fd3656 fix arize config 2025-03-18 16:54:31 -07:00
Ishaan Jaff
6468937b44 add arize_api_key to StandardCallbackDynamicParams 2025-03-18 14:46:55 -07:00
Krrish Dholakia
911b053095 fix(http_handler.py): fix typing error 2025-03-17 16:42:32 -07:00
Krrish Dholakia
b75cd3b887 feat(endpoints.py): support adding credentials by model id
Allows user to reuse existing model credentials
2025-03-14 12:32:32 -07:00
Krrish Dholakia
913dc5b73b feat(endpoints.py): enable retrieving existing credentials by model name
Enables reusing existing credentials
2025-03-14 12:02:50 -07:00
Ishaan Jaff
ad0afbb5dc Merge pull request #9222 from BerriAI/litellm_snowflake_pr_mar_13
[Feat] Add Snowflake Cortex to LiteLLM
2025-03-13 21:35:39 -07:00
Krrish Dholakia
649c41d9d1 feat(converse_transformation.py): fix type for bedrock cache usage block 2025-03-13 19:33:22 -07:00
Sunny Wan
e01d12b878 Merge branch 'BerriAI:main' into main 2025-03-13 19:37:22 -04:00
Krrish Dholakia
b51495f2da feat(converse_transformation.py): translate converse usage block with cache creation values to openai format 2025-03-13 15:49:25 -07:00
Ishaan Jaff
c3a8f140c1 working spend tracking + logging for response api 2025-03-12 17:29:25 -07:00
Krish Dholakia
103b3cb574 Merge branch 'main' into litellm_dev_03_10_2025_p3 2025-03-12 14:56:01 -07:00
Ishaan Jaff
61f4080903 fix mypy linting errors 2025-03-12 12:13:19 -07:00
Ishaan Jaff
d6ccaf1e63 Merge branch 'main' into litellm_responses_api_support 2025-03-12 12:04:12 -07:00
Ishaan Jaff
ff94836121 typing_extensions Annotated 2025-03-12 11:58:56 -07:00
Ishaan Jaff
127d084765 BaseLiteLLMOpenAIResponseObject 2025-03-12 11:39:51 -07:00
Ishaan Jaff
0dc5e784f5 working streaming logging 2025-03-12 00:02:39 -07:00
Ishaan Jaff
75a1281f77 ResponsesAPIStreamEvents 2025-03-11 23:42:35 -07:00
Ishaan Jaff
fddc1d4186 _transform_response_api_usage_to_chat_usage 2025-03-11 22:26:44 -07:00
Ishaan Jaff
161dea51d2 add responses api to call types 2025-03-11 22:02:48 -07:00
Ishaan Jaff
d6ea064ebe Response API cost tracking 2025-03-11 22:02:14 -07:00
Ishaan Jaff
71db036920 ResponsesAPIStreamingResponse 2025-03-11 17:48:15 -07:00
Ishaan Jaff
c063c4b090 ResponsesAPIOptionalRequestParams 2025-03-11 17:36:06 -07:00
Krrish Dholakia
2f262ed9b4 refactor(azure.py): refactor to have client init work across all endpoints 2025-03-11 17:27:24 -07:00
Ishaan Jaff
8ea40dddd1 add ResponsesAPIResponse 2025-03-11 16:46:28 -07:00
Ishaan Jaff
03765d334c add transform_request for OpenAI responses API 2025-03-11 16:33:26 -07:00
Ishaan Jaff
8dfd1dc136 working transform 2025-03-11 15:24:42 -07:00
Ishaan Jaff
de74bcfb8f openai reasoning initial types 2025-03-11 14:28:47 -07:00
Krrish Dholakia
6647e962a1 feat(endpoints.py): support writing credentials to db 2025-03-10 18:27:43 -07:00