mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-27 01:22:18 +00:00
refactor(rust): promote anthropic messages out of experimental_pass_through (#43269)
Co-authored-by: Yujong Lee <yujong@berri.ai>
This commit is contained in:
parent
4179860a17
commit
2ef3250ec3
15 changed files with 10 additions and 13 deletions
|
|
@ -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,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
pub mod messages;
|
||||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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::{
|
||||
|
|
|
|||
|
|
@ -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)>;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue