litellm-mirror/litellm/llms
Krish Dholakia 05a973bf19 Litellm dev bedrock anthropic 3 7 v2 (#8843)
* feat(bedrock/converse/transformation.py): support claude-3-7-sonnet reasoning_Content transformation

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

* fix(bedrock/): support returning `reasoning_content` on streaming for claude-3-7

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

* feat(bedrock/): unify converse reasoning content blocks for consistency across anthropic and bedrock

* fix(anthropic/chat/transformation.py): handle deepseek-style 'reasoning_content' extraction within transformation.py

simpler logic

* feat(bedrock/): fix streaming to return blocks in consistent format

* fix: fix linting error

* test: fix test

* feat(factory.py): fix bedrock thinking block translation on tool calling

allows passing the thinking blocks back to bedrock for tool calling

* fix(types/utils.py): don't exclude provider_specific_fields on model dump

ensures consistent responses

* fix: fix linting errors

* fix(convert_dict_to_response.py): pass reasoning_content on root

* fix: test

* fix(streaming_handler.py): add helper util for setting model id

* fix(streaming_handler.py): fix setting model id on model response stream chunk

* fix(streaming_handler.py): fix linting error

* fix(streaming_handler.py): fix linting error

* fix(types/utils.py): add provider_specific_fields to model stream response

* fix(streaming_handler.py): copy provider specific fields and add them to the root of the streaming response

* fix(streaming_handler.py): fix check

* fix: fix test

* fix(types/utils.py): ensure messages content is always openai compatible

* fix(types/utils.py): fix delta object to always be openai compatible

only introduce new params if variable exists

* test: fix bedrock nova tests

* test: skip flaky test

* test: skip flaky test in ci/cd
2025-02-26 16:05:33 -08:00
..
ai21/chat (code quality) run ruff rule to ban unused imports (#7313) 2024-12-19 12:33:42 -08:00
aiohttp_openai/chat (proxy - RPS) - Get 2K RPS at 4 instances, minor fix aiohttp_openai/ (#7659) 2025-01-09 17:24:18 -08:00
anthropic Litellm dev bedrock anthropic 3 7 v2 (#8843) 2025-02-26 16:05:33 -08:00
azure Litellm dev 02 13 2025 p2 (#8525) 2025-02-13 20:28:42 -08:00
azure_ai Add cohere v2/rerank support (#8421) (#8605) 2025-02-22 22:25:29 -08:00
base_llm Add anthropic thinking + reasoning content support (#8778) 2025-02-24 21:54:30 -08:00
bedrock Litellm dev bedrock anthropic 3 7 v2 (#8843) 2025-02-26 16:05:33 -08:00
cerebras (code quality) run ruff rule to ban unused imports (#7313) 2024-12-19 12:33:42 -08:00
clarifai fix: dictionary changed size during iteration error (#8327) (#8341) 2025-02-07 16:20:28 -08:00
cloudflare/chat fix: dictionary changed size during iteration error (#8327) (#8341) 2025-02-07 16:20:28 -08:00
codestral/completion LiteLLM Minor Fixes & Improvements (01/16/2025) - p2 (#7828) 2025-02-02 23:17:50 -08:00
cohere Add cohere v2/rerank support (#8421) (#8605) 2025-02-22 22:25:29 -08:00
custom_httpx Add cohere v2/rerank support (#8421) (#8605) 2025-02-22 22:25:29 -08:00
databricks fix: dictionary changed size during iteration error (#8327) (#8341) 2025-02-07 16:20:28 -08:00
deepgram Litellm dev 01 02 2025 p2 (#7512) 2025-01-02 21:57:51 -08:00
deepinfra/chat (code quality) run ruff rule to ban unused imports (#7313) 2024-12-19 12:33:42 -08:00
deepseek LiteLLM Minor Fixes & Improvements (12/23/2024) - p3 (#7394) 2024-12-23 22:02:52 -08:00
deprecated_providers fix: dictionary changed size during iteration error (#8327) (#8341) 2025-02-07 16:20:28 -08:00
empower/chat LiteLLM Common Base LLM Config (pt.3): Move all OAI compatible providers to base llm config (#7148) 2024-12-10 17:12:42 -08:00
fireworks_ai Fix custom pricing - separate provider info from model info (#7990) 2025-01-25 21:49:28 -08:00
friendliai/chat (code quality) run ruff rule to ban unused imports (#7313) 2024-12-19 12:33:42 -08:00
galadriel/chat (code quality) run ruff rule to ban unused imports (#7313) 2024-12-19 12:33:42 -08:00
gemini fix: dictionary changed size during iteration error (#8327) (#8341) 2025-02-07 16:20:28 -08:00
github/chat (code quality) run ruff rule to ban unused imports (#7313) 2024-12-19 12:33:42 -08:00
groq fix(groq/chat/transformation.py): fix groq response_format transformation (#7565) 2025-01-04 19:39:04 -08:00
hosted_vllm (code quality) run ruff rule to ban unused imports (#7313) 2024-12-19 12:33:42 -08:00
huggingface fix: dictionary changed size during iteration error (#8327) (#8341) 2025-02-07 16:20:28 -08:00
infinity/rerank add bedrock llama vision support + cohere / infinity rerank - 'return_documents' support (#8684) 2025-02-20 21:23:54 -08:00
jina_ai Add cohere v2/rerank support (#8421) (#8605) 2025-02-22 22:25:29 -08:00
litellm_proxy/chat [BETA] Add OpenAI /images/variations + Topaz API support (#7700) 2025-01-11 23:27:46 -08:00
lm_studio fix: dictionary changed size during iteration error (#8327) (#8341) 2025-02-07 16:20:28 -08:00
mistral _handle_tool_call_message linting 2025-01-16 22:34:16 -08:00
nlp_cloud fix: dictionary changed size during iteration error (#8327) (#8341) 2025-02-07 16:20:28 -08:00
nvidia_nim fix: dictionary changed size during iteration error (#8327) (#8341) 2025-02-07 16:20:28 -08:00
ollama fix: dictionary changed size during iteration error (#8327) (#8341) 2025-02-07 16:20:28 -08:00
oobabooga Litellm dev 12 30 2024 p2 (#7495) 2025-01-01 18:57:29 -08:00
openai fix(o_series_transformation.py): fix optional param check for o-serie… (#8787) 2025-02-26 12:26:55 -08:00
openai_like fix: propagating json_mode to acompletion (#8133) 2025-01-30 21:17:26 -08:00
openrouter/chat (code quality) run ruff rule to ban unused imports (#7313) 2024-12-19 12:33:42 -08:00
perplexity/chat pplx - fix supports tool choice openai param (#8496) 2025-02-12 17:21:16 -08:00
petals fix: dictionary changed size during iteration error (#8327) (#8341) 2025-02-07 16:20:28 -08:00
predibase fix: dictionary changed size during iteration error (#8327) (#8341) 2025-02-07 16:20:28 -08:00
replicate fix: dictionary changed size during iteration error (#8327) (#8341) 2025-02-07 16:20:28 -08:00
sagemaker fix: dictionary changed size during iteration error (#8327) (#8341) 2025-02-07 16:20:28 -08:00
sambanova (code quality) run ruff rule to ban unused imports (#7313) 2024-12-19 12:33:42 -08:00
together_ai add bedrock llama vision support + cohere / infinity rerank - 'return_documents' support (#8684) 2025-02-20 21:23:54 -08:00
topaz (Feat) - Add /bedrock/invoke support for all Anthropic models (#8383) 2025-02-07 22:41:11 -08:00
triton Litellm dev 12 30 2024 p2 (#7495) 2025-01-01 18:57:29 -08:00
vertex_ai fix(utils.py): fix vertex ai optional param handling (#8477) 2025-02-13 19:58:50 -08:00
vllm/completion (code quality) run ruff rule to ban unused imports (#7313) 2024-12-19 12:33:42 -08:00
voyage/embedding Litellm dev 12 30 2024 p2 (#7495) 2025-01-01 18:57:29 -08:00
watsonx fix: dictionary changed size during iteration error (#8327) (#8341) 2025-02-07 16:20:28 -08:00
xai/chat (code quality) run ruff rule to ban unused imports (#7313) 2024-12-19 12:33:42 -08:00
__init__.py add linting 2023-08-18 11:05:05 -07:00
base.py Complete 'requests' library removal (#7350) 2024-12-22 07:21:25 -08:00
baseten.py test(base_llm_unit_tests.py): add test to ensure drop params is respe… (#8224) 2025-02-03 16:04:44 -08:00
custom_llm.py (code quality) run ruff rule to ban unused imports (#7313) 2024-12-19 12:33:42 -08:00
maritalk.py fix: dictionary changed size during iteration error (#8327) (#8341) 2025-02-07 16:20:28 -08:00
ollama_chat.py fix: dictionary changed size during iteration error (#8327) (#8341) 2025-02-07 16:20:28 -08:00
README.md LiteLLM Minor Fixes and Improvements (09/13/2024) (#5689) 2024-09-14 10:02:55 -07:00
volcengine.py (code quality) run ruff rule to ban unused imports (#7313) 2024-12-19 12:33:42 -08:00

File Structure

August 27th, 2024

To make it easy to see how calls are transformed for each model/provider:

we are working on moving all supported litellm providers to a folder structure, where folder name is the supported litellm provider name.

Each folder will contain a *_transformation.py file, which has all the request/response transformation logic, making it easy to see how calls are modified.

E.g. cohere/, bedrock/.