mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-22 00:31:44 +00:00
fix(rust): reconcile rebase with realtime and routing_utils removal on main
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
26b5cd57a7
commit
3fcefa82f2
10 changed files with 4 additions and 40 deletions
2
litellm-rust/Cargo.lock
generated
2
litellm-rust/Cargo.lock
generated
|
|
@ -1944,7 +1944,6 @@ dependencies = [
|
|||
"serde_json",
|
||||
"sha2 0.10.9",
|
||||
"tokio",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -1997,7 +1996,6 @@ dependencies = [
|
|||
"thiserror 2.0.19",
|
||||
"tokio",
|
||||
"tokio-tungstenite",
|
||||
"tracing",
|
||||
"url",
|
||||
"veil",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -12,6 +12,5 @@ moka.workspace = true
|
|||
serde_json.workspace = true
|
||||
sha2.workspace = true
|
||||
tokio.workspace = true
|
||||
tracing.workspace = true
|
||||
|
||||
gcp_auth = "0.12.7"
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ subtle.workspace = true
|
|||
tokio = { workspace = true, features = ["sync"] }
|
||||
tokio-tungstenite.workspace = true
|
||||
thiserror.workspace = true
|
||||
tracing.workspace = true
|
||||
sha2.workspace = true
|
||||
url.workspace = true
|
||||
veil.workspace = true
|
||||
|
|
|
|||
|
|
@ -10,6 +10,4 @@ pub enum Error {
|
|||
AudioTranscription(#[from] crate::audio_transcription::Error),
|
||||
#[error(transparent)]
|
||||
Responses(#[from] crate::responses::Error),
|
||||
#[error(transparent)]
|
||||
Realtime(#[from] crate::realtime::Error),
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ pub mod ocr;
|
|||
pub mod params;
|
||||
pub mod providers;
|
||||
pub mod responses;
|
||||
pub mod routing_utils;
|
||||
mod serde_compat;
|
||||
mod url_utils;
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ use crate::ocr::types::{
|
|||
PreparedOcrRequest,
|
||||
};
|
||||
use crate::params::OpaqueParams;
|
||||
use crate::routing_utils::model::{ModelNamespace, ProviderModel, RoutedModel};
|
||||
use crate::providers::model::{ModelNamespace, ProviderModel, RoutedModel};
|
||||
use crate::url_utils::ApiUrl;
|
||||
|
||||
const DEFAULT_API_BASE: &str = "https://aiplatform.googleapis.com";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
use crate::routing_utils::provider::{CustomLlmProvider, get_custom_llm_provider};
|
||||
use crate::providers::custom_llm_provider::{CustomLlmProvider, get_custom_llm_provider};
|
||||
|
||||
use super::common_utils::{has_bearer_auth, has_header, messages_provider_config, string_headers};
|
||||
use super::transformation::{AnthropicMessagesProviderConfig, MessagesAuthStrategy};
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ use crate::llms::mistral::ocr::transformation::MistralOCRConfig;
|
|||
use crate::llms::reducto::ocr::transformation::{ReductoParseLegacyConfig, ReductoParseV3Config};
|
||||
use crate::llms::vertex_ai::ocr::deepseek_transformation::VertexAIDeepSeekOCRConfig;
|
||||
use crate::llms::vertex_ai::ocr::transformation::VertexAIOCRConfig;
|
||||
use crate::routing_utils::provider::{CustomLlmProvider, get_custom_llm_provider};
|
||||
use crate::providers::custom_llm_provider::{CustomLlmProvider, get_custom_llm_provider};
|
||||
use strum::{EnumString, IntoStaticStr};
|
||||
|
||||
macro_rules! dispatch_config {
|
||||
|
|
|
|||
|
|
@ -1,19 +0,0 @@
|
|||
#[derive(Clone, Debug, PartialEq, Eq, thiserror::Error)]
|
||||
pub enum Error {
|
||||
#[error("invalid provider: {0}")]
|
||||
InvalidProvider(String),
|
||||
#[error("invalid request: {0}")]
|
||||
InvalidRequest(String),
|
||||
#[error("invalid response: {0}")]
|
||||
InvalidResponse(String),
|
||||
#[error("routing error: {0}")]
|
||||
Routing(String),
|
||||
#[error(transparent)]
|
||||
Auth(#[from] litellm_auth::Error),
|
||||
#[error(transparent)]
|
||||
Transport(#[from] crate::transport::Error),
|
||||
#[error(transparent)]
|
||||
Params(#[from] crate::params::Error),
|
||||
#[error(transparent)]
|
||||
Headers(#[from] crate::http_utils::HeaderError),
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
use litellm_core::transport::Error as TransportError;
|
||||
use litellm_core::{Error, audio_transcription, chat_completions, messages, realtime, responses};
|
||||
use litellm_core::{Error, audio_transcription, chat_completions, messages, responses};
|
||||
use pyo3::exceptions::{PyRuntimeError, PyValueError};
|
||||
use pyo3::prelude::*;
|
||||
|
||||
|
|
@ -61,16 +61,6 @@ pub(crate) fn core_error_to_pyerr(error: impl Into<Error>) -> PyErr {
|
|||
| chat_completions::Error::Aws(_) => true,
|
||||
_ => false,
|
||||
},
|
||||
Error::Realtime(error) => match error {
|
||||
realtime::Error::Auth(source) => {
|
||||
!matches!(source, litellm_auth::Error::MissingApiKey { .. })
|
||||
}
|
||||
realtime::Error::InvalidProvider(_)
|
||||
| realtime::Error::InvalidRequest(_)
|
||||
| realtime::Error::Params(_)
|
||||
| realtime::Error::Headers(_) => true,
|
||||
_ => false,
|
||||
},
|
||||
Error::Responses(error) => match error {
|
||||
responses::Error::Auth(source) => {
|
||||
!matches!(source, litellm_auth::Error::MissingApiKey { .. })
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue