The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
refactor(rust): promote anthropic messages out of experimental_pass_through (#43269)
devin-ai-integration[bot]2ef3250ec3bd
diff --git a/litellm-rust/crates/core/src/messages/common_utils.rs b/litellm-rust/crates/core/src/messages/common_utils.rsindex d27b79bdc04..95142e87519 100644--- a/litellm-rust/crates/core/src/messages/common_utils.rs+++ b/litellm-rust/crates/core/src/messages/common_utils.rs@@ -1,7 +1,7 @@use litellm_http::request::string_headers as shared_string_headers;pub(super) use litellm_http::request::truncate_error_body;use litellm_llms::{- anthropic::experimental_pass_through::messages::transformation::ANTHROPIC_MESSAGES_CONFIG,+ anthropic::messages::transformation::ANTHROPIC_MESSAGES_CONFIG,azure_ai::anthropic::messages_transformation::AZURE_ANTHROPIC_MESSAGES_CONFIG,base_llm::anthropic_messages::transformation::BaseAnthropicMessagesConfig,};diff --git a/litellm-rust/crates/core/src/messages/prepare.rs b/litellm-rust/crates/core/src/messages/prepare.rsindex dc4b3562e3f..84884ab279e 100644--- a/litellm-rust/crates/core/src/messages/prepare.rs+++ b/litellm-rust/crates/core/src/messages/prepare.rs@@ -5,7 +5,7 @@ use litellm_core_utils::{settings::Lookup,};use litellm_llms::{- anthropic::experimental_pass_through::messages::handler::shape_anthropic_messages_request,+ anthropic::messages::handler::shape_anthropic_messages_request,base_llm::anthropic_messages::transformation::{BaseAnthropicMessagesConfig, MessagesTransformContext,},diff --git a/litellm-rust/crates/llms/src/anthropic/batches/transformation.rs b/litellm-rust/crates/llms/src/anthropic/batches/transformation.rsindex 94e4dc7838a..1c26684901a 100644--- a/litellm-rust/crates/llms/src/anthropic/batches/transformation.rs+++ b/litellm-rust/crates/llms/src/anthropic/batches/transformation.rs@@ -5,7 +5,7 @@ use time::OffsetDateTime;use url::Url;use crate::{- anthropic::experimental_pass_through::messages::transformation::resolve_anthropic_api_base,+ anthropic::messages::transformation::resolve_anthropic_api_base,base_llm::chat::transformation::Error,};diff --git a/litellm-rust/crates/llms/src/anthropic/chat/handler.rs b/litellm-rust/crates/llms/src/anthropic/chat/handler.rsindex a80cfbf28bd..9160cdf28ee 100644--- a/litellm-rust/crates/llms/src/anthropic/chat/handler.rs+++ b/litellm-rust/crates/llms/src/anthropic/chat/handler.rs@@ -7,7 +7,7 @@ use litellm_types::{use serde_json::Value;use crate::{- anthropic::experimental_pass_through::messages::streaming_iterator::{+ anthropic::messages::streaming_iterator::{AnthropicContentBlock, AnthropicContentBlockDelta, AnthropicMessagesStreamEvent,AnthropicStreamUsage,},diff --git a/litellm-rust/crates/llms/src/anthropic/chat/transformation.rs b/litellm-rust/crates/llms/src/anthropic/chat/transformation.rsindex fd86c5ca25a..07ed6ba6ed1 100644--- a/litellm-rust/crates/llms/src/anthropic/chat/transformation.rs+++ b/litellm-rust/crates/llms/src/anthropic/chat/transformation.rs@@ -11,9 +11,7 @@ use serde_json::{Map, Value, json};use crate::{anthropic::{ANTHROPIC_OAUTH_TOKEN_PREFIX,- experimental_pass_through::messages::transformation::{- complete_anthropic_url, resolve_anthropic_api_key,- },+ messages::transformation::{complete_anthropic_url, resolve_anthropic_api_key},},base_llm::chat::transformation::{BaseConfig, Error, ProviderChatRequestData, ProviderChatResponseData, RequestAuth,diff --git a/litellm-rust/crates/llms/src/anthropic/experimental_pass_through/mod.rs b/litellm-rust/crates/llms/src/anthropic/experimental_pass_through/mod.rsdeleted file mode 100644index ba63992f3cb..00000000000--- a/litellm-rust/crates/llms/src/anthropic/experimental_pass_through/mod.rs+++ /dev/null@@ -1 +0,0 @@-pub mod messages;diff --git a/litellm-rust/crates/llms/src/anthropic/experimental_pass_through/messages/handler.rs b/litellm-rust/crates/llms/src/anthropic/messages/handler.rssimilarity index 100%rename from litellm-rust/crates/llms/src/anthropic/experimental_pass_through/messages/handler.rsrename to litellm-rust/crates/llms/src/anthropic/messages/handler.rsdiff --git a/litellm-rust/crates/llms/src/anthropic/experimental_pass_through/messages/headers.rs b/litellm-rust/crates/llms/src/anthropic/messages/headers.rssimilarity index 100%rename from litellm-rust/crates/llms/src/anthropic/experimental_pass_through/messages/headers.rsrename to litellm-rust/crates/llms/src/anthropic/messages/headers.rsdiff --git a/litellm-rust/crates/llms/src/anthropic/experimental_pass_through/messages/mod.rs b/litellm-rust/crates/llms/src/anthropic/messages/mod.rssimilarity index 100%rename from litellm-rust/crates/llms/src/anthropic/experimental_pass_through/messages/mod.rsrename to litellm-rust/crates/llms/src/anthropic/messages/mod.rsdiff --git a/litellm-rust/crates/llms/src/anthropic/experimental_pass_through/messages/streaming_iterator.rs b/litellm-rust/crates/llms/src/anthropic/messages/streaming_iterator.rssimilarity index 100%rename from litellm-rust/crates/llms/src/anthropic/experimental_pass_through/messages/streaming_iterator.rsrename to litellm-rust/crates/llms/src/anthropic/messages/streaming_iterator.rsdiff --git a/litellm-rust/crates/llms/src/anthropic/experimental_pass_through/messages/thinking.rs b/litellm-rust/crates/llms/src/anthropic/messages/thinking.rssimilarity index 100%rename from litellm-rust/crates/llms/src/anthropic/experimental_pass_through/messages/thinking.rsrename to litellm-rust/crates/llms/src/anthropic/messages/thinking.rsdiff --git a/litellm-rust/crates/llms/src/anthropic/experimental_pass_through/messages/transformation.rs b/litellm-rust/crates/llms/src/anthropic/messages/transformation.rssimilarity index 100%rename from litellm-rust/crates/llms/src/anthropic/experimental_pass_through/messages/transformation.rsrename to litellm-rust/crates/llms/src/anthropic/messages/transformation.rsdiff --git a/litellm-rust/crates/llms/src/anthropic/mod.rs b/litellm-rust/crates/llms/src/anthropic/mod.rsindex 755bc7d1907..a884c146dca 100644--- a/litellm-rust/crates/llms/src/anthropic/mod.rs+++ b/litellm-rust/crates/llms/src/anthropic/mod.rs@@ -1,7 +1,8 @@+pub mod common_utils;+pub mod batches;pub mod chat;-pub mod common_utils;pub mod count_tokens;-pub mod experimental_pass_through;+pub mod messages;pub const ANTHROPIC_OAUTH_TOKEN_PREFIX: &str = "sk-ant-oat";diff --git a/litellm-rust/crates/llms/src/azure_ai/anthropic/messages_transformation.rs b/litellm-rust/crates/llms/src/azure_ai/anthropic/messages_transformation.rsindex c409f7f687e..137239bbeaf 100644--- a/litellm-rust/crates/llms/src/azure_ai/anthropic/messages_transformation.rs+++ b/litellm-rust/crates/llms/src/azure_ai/anthropic/messages_transformation.rs@@ -6,7 +6,7 @@ use litellm_types::llms::anthropic_messages::{};use crate::{- anthropic::experimental_pass_through::messages::transformation::{+ anthropic::messages::transformation::{ANTHROPIC_MESSAGES_CONFIG, AnthropicMessagesConfig, non_empty,},base_llm::{diff --git a/litellm-rust/crates/llms/src/base_llm/anthropic_messages/transformation.rs b/litellm-rust/crates/llms/src/base_llm/anthropic_messages/transformation.rsindex 8db14687214..eff1dd1cf0b 100644--- a/litellm-rust/crates/llms/src/base_llm/anthropic_messages/transformation.rs+++ b/litellm-rust/crates/llms/src/base_llm/anthropic_messages/transformation.rs@@ -4,8 +4,7 @@ use litellm_types::llms::anthropic_messages::{};use crate::{- anthropic::experimental_pass_through::messages::thinking::ThinkingContext,- base_llm::chat::transformation::Error,+ anthropic::messages::thinking::ThinkingContext, base_llm::chat::transformation::Error,};pub type Headers = Vec<(String, String)>;