Commit graph

1980 commits

Author SHA1 Message Date
Utkash Dubey
e5fefe5105
Update model_prices_and_context_window.json 2025-03-10 14:53:27 -07:00
Utkash Dubey
495b3dc026 feedback 2025-03-10 14:52:30 -07:00
Utkash Dubey
c7a04140e9 Revert "changes"
This reverts commit fa88bc9632.
2025-03-10 14:46:21 -07:00
Utkash Dubey
1f17daf52c
Merge branch 'BerriAI:main' into main 2025-03-10 14:42:30 -07:00
William Kearns
16f614c7a0
add bedrock deepseek r1 model pricing 2025-03-10 14:29:17 -07:00
Ishaan Jaff
0fcce63852
Merge pull request #9032 from themrzmaster/feat/jamba_1.6
pricing for jamba new models
2025-03-10 13:59:37 -07:00
omrishiv
0674491386
add support for Amazon Nova Canvas model (#7838)
* 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>

---------

Signed-off-by: omrishiv <327609+omrishiv@users.noreply.github.com>
Co-authored-by: Krish Dholakia <krrishdholakia@gmail.com>
2025-03-10 08:02:00 -07:00
Ishaan Jaff
b6eee01381 Revert "experimental - track anthropic messages as mode"
This reverts commit 22b3862e0d.
2025-03-08 17:38:24 -08:00
Ishaan Jaff
22b3862e0d experimental - track anthropic messages as mode 2025-03-08 17:33:35 -08:00
Minh Duc
d3ececfc20
Mark several Claude models as being able to accept PDF inputs (#9054) 2025-03-07 10:05:57 -08:00
Ishaan Jaff
7f70bdd99b
(Feat) - add pricing for eu.amazon.nova models (#9056)
* add pricing for eu.amazon.nova models

* fix typo in key management endpoints.py
2025-03-07 07:06:17 -08:00
Krish Dholakia
52de1949ef
build(model_prices_and_context_window.json): update azure o1 mini pricing (#9046) 2025-03-06 22:28:06 -08:00
lucca
af9f85e0d9
fix 2025-03-06 15:57:29 -03:00
lucca
9dee3e2e3f
pricing 2025-03-06 13:28:07 -03:00
Krish Dholakia
744e10b0f0
Litellm dev 03 05 2025 p3 (#9023)
* fix(invoke_handler.py): fix converse streaming - return signature + ensure consistency with anthropic api response

* build(model_prices_and_context_window.json): fix anthropic api claude-3-7 max output tokens

with beta header this is 128k

Resolves https://github.com/BerriAI/litellm/issues/8964

* feat(handler.py): handle new anthropic 'thinking_delta' block on streaming

Fixes https://github.com/BerriAI/litellm/issues/8825
2025-03-05 22:31:39 -08:00
Utkash Dubey
fa88bc9632 changes 2025-03-03 04:16:12 -08:00
Krrish Dholakia
db83cbe5c0 build(model_prices_and_context_window.json): add new tracking for anthropic via invoke - clarify it does not support pdf input unlike converse 2025-03-02 22:31:31 -08:00
Takashi Iwamoto
f63cf00306
Add supports_pdf_input: true for specific Bedrock Claude models (#8655) 2025-03-02 08:14:05 -08:00
Юрій
1affd0f178
Update model settings data (#8871)
* Update model settings data

* Update cache creation input for claude-3-5-haiku-20241022
2025-02-27 20:24:03 -08:00
Krish Dholakia
ff553fedf8
Add new gpt-4.5-preview model + other updates (#8879)
* fix(rerank): properly use LiteLLM api key when reranking through proxy (#8873)

`litellm.api_key` wasn't used as an option when calling the rerank API.
As a result, using rerank with custom_llm_provider="litellm_proxy" always
resulted in the following error:
Cohere API key is required. Please set 'COHERE_API_KEY' or 'CO_API_KEY' or 'litellm.cohere_key'

* feat(model_prices_and_context_window.json): add new gpt-4.5-preview model

---------

Co-authored-by: Enzo Aguado <enzo@aguado.me>
2025-02-27 15:27:14 -08:00
Minh Duc
371f32b0d4
Mark Claude Haiku 3.5 as vision-capable (#8840) 2025-02-26 16:06:03 -08:00
fengjiajie
07c0d26e68
Adding openrouter claude-3.7-sonnet (#8826) 2025-02-25 22:36:07 -08:00
Emerson Gomes
ef22209a15
Adding Azure Phi-4 (#8808)
Co-authored-by: Emerson Gomes <emerson.gomes@thalesgroup.com>
2025-02-25 15:46:46 -08:00
Krish Dholakia
b829475587
Litellm dev 02 25 2025 p1 (#8816)
* build(model_prices_and_context_window.json): add bedrock cross-region inferencing model information

Closes https://github.com/BerriAI/litellm/issues/8801#issuecomment-2683438528

* build(model_prices_and_context_window.json): add claude sonnet `-latest` models to model cost map

Closes https://github.com/BerriAI/litellm/discussions/8770#discussioncomment-12318880

* build(model_prices_and_context_window.json): add remaining anthropic `-latest` models to model cost map

Closes https://github.com/BerriAI/litellm/discussions/8770#discussioncomment-12318880

* test: update test with new model
2025-02-25 15:20:39 -08:00
Emerson Gomes
fd9e62cbc8
fix vertex_ai claude 3.7 naming (#8807)
Co-authored-by: Emerson Gomes <emerson.gomes@thalesgroup.com>
2025-02-25 14:30:52 -08:00
Emerson Gomes
57faa623e3 Adding Azure Phi-4 2025-02-25 10:44:10 -06:00
Krish Dholakia
9914c166b7
Litellm contributor prs 02 24 2025 (#8775)
* Adding VertexAI Claude 3.7 Sonnet (#8774)

Co-authored-by: Emerson Gomes <emerson.gomes@thalesgroup.com>

* build(model_prices_and_context_window.json): add anthropic 3-7 models on vertex ai and bedrock

* Support video_url (#8743)

* Support video_url

Support VLMs that works with video.
Example implemenation in vllm: https://github.com/vllm-project/vllm/pull/10020

* llms openai.py: Add ChatCompletionVideoObject

Add data structures to support `video_url` in chat completion

* test test_completion.py: add test for video_url

* Arize Phoenix - ensure correct endpoint/protocol are used; and default to phoenix cloud (#8750)

* minor fixes to default to http and to ensure that the correct endpoint is used

* Update test_arize_phoenix.py

* prioritize http over grpc

---------

Co-authored-by: Emerson Gomes <emerson.gomes@gmail.com>
Co-authored-by: Emerson Gomes <emerson.gomes@thalesgroup.com>
Co-authored-by: Pang Wu <104795337+pang-wu@users.noreply.github.com>
Co-authored-by: Nate Mar <67926244+nate-mar@users.noreply.github.com>
2025-02-24 18:55:48 -08:00
Dragos Campean
2905ad98b3
Add anthropic3-7-sonnet (#8766) 2025-02-24 12:59:00 -08:00
Yazan Agha-Schrader
4b8db4ec34
Update model_prices_and_context_window.json
fix mistral/mistral-small from 1$/3$ per million tokens to -> 0.1$/0.3$ per million tokens

cave: azure_ai and bedrock still show 1$/3$ for input/output cost per million - i dont have knowledge about azure and bedrock prices, but looks like wrong values as well. **please check**
2025-02-24 11:18:18 +01:00
Krish Dholakia
251467a525
add bedrock llama vision support + cohere / infinity rerank - 'return_documents' support (#8684)
* build(model_prices_and_context_window.json): mark bedrock llama as supporting vision based on docs

* Add price for Cerebras llama3.3-70b (#8676)

* docs(readme.md): fix contributing docs

point people to new mock directory testing structure s/o @vibhavbhat

* build: update contributing readme

* docs(readme.md): improve docs

* docs(readme.md): cleanup readme on tests/

* docs(README.md): cleanup doc

* feat(infinity/): support returning documents when return_documents=True

* test(test_rerank.py): add e2e testing for cohere rerank

* fix: fix linting errors

* fix(together_ai/): fix together ai transformation

* fix: fix linting error

* fix: fix linting errors

* fix: fix linting errors

* test: mark cohere as flaky

* build: fix model supports check

* test: fix test

* test: mark flaky test

* fix: fix test

* test: fix test

---------

Co-authored-by: Yury Koleda <fut.wrk@gmail.com>
2025-02-20 21:23:54 -08:00
Krish Dholakia
b682dc4ec8
Add cost tracking for rerank via bedrock (#8691)
* feat(bedrock/rerank): infer model region if model given as arn

* test: add unit testing to ensure bedrock region name inferred from arn on rerank

* feat(bedrock/rerank/transformation.py): include search units for bedrock rerank result

Resolves https://github.com/BerriAI/litellm/issues/7258#issuecomment-2671557137

* test(test_bedrock_completion.py): add testing for bedrock cohere rerank

* feat(cost_calculator.py): refactor rerank cost tracking to support bedrock cost tracking

* build(model_prices_and_context_window.json): add amazon.rerank model to model cost map

* fix(cost_calculator.py): bedrock/common_utils.py

get base model from model w/ arn -> handles rerank model

* build(model_prices_and_context_window.json): add bedrock cohere rerank pricing

* feat(bedrock/rerank): migrate bedrock config to basererank config

* Revert "feat(bedrock/rerank): migrate bedrock config to basererank config"

This reverts commit 84fae1f167.

* test: add testing to ensure large doc / queries are correctly counted

* Revert "test: add testing to ensure large doc / queries are correctly counted"

This reverts commit 4337f1657e.

* fix(migrate-jina-ai-to-rerank-config): enables cost tracking

* refactor(jina_ai/): finish migrating jina ai to base rerank config

enables cost tracking

* fix(jina_ai/rerank): e2e jina ai rerank cost tracking

* fix: cleanup dead code

* fix: fix python3.8 compatibility error

* test: fix test

* test: add e2e testing for azure ai rerank

* fix: fix linting error

* test: mark cohere as flaky
2025-02-20 21:00:18 -08:00
Krish Dholakia
ea985dda0b
fix(model_cost_map): fix json parse error on model cost map + add unit test (#8629)
Fixes https://github.com/BerriAI/litellm/pull/8619#issuecomment-2666693045
2025-02-18 11:18:16 -08:00
HeMuling
369b636b5a
add openrouter/google/gemini-2.0-flash-001 (#8619) 2025-02-18 10:14:49 -08:00
Ishaan Jaff
125f6fff67
(Feat) - Add /bedrock/meta.llama3-3-70b-instruct-v1:0 tool calling support + cost tracking + base llm unit test for tool calling (#8545)
* Add support for bedrock meta.llama3-3-70b-instruct-v1:0 tool calling (#8512)

* fix(converse_transformation.py): fixing bedrock meta.llama3-3-70b tool calling

* test(test_bedrock_completion.py): adding llama3.3 tool compatibility check

* add TestBedrockTestSuite

* add bedrock llama 3.3 to base llm class

* us.meta.llama3-3-70b-instruct-v1:0

* test_basic_tool_calling

* TestAzureOpenAIO1

* test_basic_tool_calling

* test_basic_tool_calling

---------

Co-authored-by: miraclebakelaser <65143272+miraclebakelaser@users.noreply.github.com>
2025-02-14 14:15:25 -08:00
Krish Dholakia
58141df65d
Litellm dev 02 13 2025 p2 (#8525)
* fix(azure/chat/gpt_transformation.py): add 'prediction' as a support azure param

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

* build(model_prices_and_context_window.json): add new 'gemini-2.0-pro-exp-02-05' model

* style: cleanup invalid json trailing commma

* feat(utils.py): support passing 'tokenizer_config' to register_prompt_template

enables passing complete tokenizer config of model to litellm

 Allows calling deepseek on bedrock with the correct prompt template

* fix(utils.py): fix register_prompt_template for custom model names

* test(test_prompt_factory.py): fix test

* test(test_completion.py): add e2e test for bedrock invoke deepseek ft model

* feat(base_invoke_transformation.py): support hf_model_name param for bedrock invoke calls

enables proxy admin to set base model for ft bedrock deepseek model

* feat(bedrock/invoke): support deepseek_r1 route for bedrock

makes it easy to apply the right chat template to that call

* feat(constants.py): store deepseek r1 chat template - allow user to get correct response from deepseek r1 without extra work

* test(test_completion.py): add e2e mock test for bedrock deepseek

* docs(bedrock.md): document new deepseek_r1 route for bedrock

allows us to use the right config

* fix(exception_mapping_utils.py): catch read operation timeout
2025-02-13 20:28:42 -08:00
Krish Dholakia
305049a968
Litellm dev 02 12 2025 p1 (#8494)
* Resolves https://github.com/BerriAI/litellm/issues/6625 (#8459)

- enables no auth for SMTP

Signed-off-by: Regli Daniel <daniel.regli1@sanitas.com>

* add sonar pricings (#8476)

* add sonar pricings

* Update model_prices_and_context_window.json

* Update model_prices_and_context_window.json

* Update model_prices_and_context_window_backup.json

* test: fix test

---------

Signed-off-by: Regli Daniel <daniel.regli1@sanitas.com>
Co-authored-by: Dani Regli <1daniregli@gmail.com>
Co-authored-by: Lucca Zenóbio <luccazen@gmail.com>
2025-02-12 22:39:29 -08:00
Ishaan Jaff
ca7c5e8773
pplx - fix supports tool choice openai param (#8496) 2025-02-12 17:21:16 -08:00
Lucca Zenóbio
dfb5a9985d
add sonar pricings (#8476)
* add sonar pricings

* Update model_prices_and_context_window.json

* Update model_prices_and_context_window.json

* Update model_prices_and_context_window_backup.json
2025-02-12 08:45:29 -08:00
Krrish Dholakia
d918b089c6 build(model_prices_and_context_window.json): handle azure model update 2025-02-11 22:40:32 -08:00
Ishaan Jaff
80b13007f6 add supports_response_schema for /bedrock/nova models 2025-02-08 09:20:30 -08:00
Ishaan Jaff
b3de3216a8 fix supports_response_schema bedrock/anthropic models 2025-02-07 19:03:08 -08:00
Byron Grogan
5a42be43e0
fix: add azure/o1-2024-12-17 to model_prices_and_context_window.json (#8371) 2025-02-07 16:22:33 -08:00
Nikolaiev Dmytro
346d8a9132
Update deepseek API prices for 2025-02-08 (#8363) 2025-02-07 08:25:35 -08:00
Ishaan Jaff
778bbcdd9c fix test_get_model_info_gemini 2025-02-06 21:05:47 -08:00
Ishaan Jaff
d2fec8bf13 databricks/meta-llama-3.3-70b-instruct 2025-02-06 18:21:56 -08:00
Anton Abilov
fac1d2ccef
Fixed meta llama 3.3 key for Databricks API (#8093)
See correct key reference here: https://docs.databricks.com/en/machine-learning/model-serving/foundation-model-overview.html#pay-per-token
2025-02-06 18:05:49 -08:00
Wanis Elabbar
15ac5f3c32
Fix pricing for Gemini 2.0 Flash 001 (#8320)
Model 	Type 	Price 	Price with Batch API
Gemini 2.0 Flash
1M Input tokens 	$0.15 	$0.075
1M Input audio tokens 	$1.00 	$0.50
1M Output text tokens 	$0.60 	$0.30

https://cloud.google.com/vertex-ai/generative-ai/pricing#token-based-pricing
2025-02-06 16:17:29 -08:00
Luis Sanchez
1b4f0f7192
Add aistudio GEMINI 2.0 to model_prices_and_context_window.json (#8335) 2025-02-06 16:16:54 -08:00
Krish Dholakia
bcfa641b81
Add gemini-2.0-flash pricing + model info (#8303)
* add gemini-2.0-flash-001 (#8289)

* build(model_prices_and_context_window.json): add gemini-2.0-flash-001 to model cost map

Adds new gemini model with token based pricing to model cost map

---------

Co-authored-by: kushagro <kush@orby.ai>
2025-02-05 20:49:26 -08:00
Ishaan Jaff
818792228c
(Refactor) - migrate bedrock invoke to BaseLLMHTTPHandler class (#8290)
* initial transform for invoke

* invoke transform_response

* working - able to make request

* working get_complete_url

* working - invoke now runs on llm_http_handler

* fix unused imports

* track litellm overhead ms

* working stream request

* sign_request transform

* sign_request update

* use has_async_custom_stream_wrapper property

* use get_async_custom_stream_wrapper in base llm http handler

* fix make_call in invoke handler

* fix invoke with streaming get_async_custom_stream_wrapper

* working bedrock async streaming with invoke

* fix make call handler for bedrock

* test_all_model_configs

* fix test_bedrock_custom_prompt_template

* sync streaming for bedrock invoke

* fix _add_stream_param_to_request_body

* test_async_text_completion_bedrock

* fix transform_request

* fix get_supported_openai_params

* fix test supports tool choice

* fix test_supports_tool_choice

* add unit test coverage for bedrock invoke transform

* fix location of transformation files

* update import loc

* fix bedrock invoke unit tests

* fix import for max completion tokens
2025-02-05 18:58:55 -08:00