refactor(rust): promote anthropic messages out of experimental_pass_through (#43269)

Co-authored-by: Yujong Lee <yujong@berri.ai>
This commit is contained in:
devin-ai-integration[bot] 2026-09-26 02:16:32 +00:00 • committed by GitHub
parent 4179860a17
commit 2ef3250ec3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 10 additions and 13 deletions

View file

@ -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,
};

View file

@ -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,
},

View file

@ -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,
};

View file

@ -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,
},

View file

@ -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,

View file

@ -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";

View file

@ -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::{

View file

@ -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)>;