mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-25 22:20:43 +00:00
* build(rust): upgrade reqwest to 0.13 and move MCP out of litellm-http The workspace moves to reqwest 0.13, so litellm-http no longer carries a second reqwest just for rmcp. The mcp feature, its pool and its proxy conversion go away, and the gateway hands rmcp a pooled NoRedirect client that already carries the TLS, proxy and timeout settings The Client test helpers collapse into for_test, a no-redirect client without TLS or proxy settings, and wrap_for_test for the few tests that need a hand-built reqwest client Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * build(deps): refresh compatible dependencies flagged by OSV * refactor(rust): remove redundant client construction comment * test(rust): cover configured MCP proxy and CA bundle --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
33 lines
756 B
Rust
33 lines
756 B
Rust
use std::ops::Deref;
|
|
|
|
#[derive(Clone, Debug)]
|
|
pub struct Client(reqwest::Client);
|
|
|
|
impl Client {
|
|
pub(crate) fn new(client: reqwest::Client) -> Self {
|
|
Self(client)
|
|
}
|
|
|
|
#[cfg(any(test, feature = "test-support"))]
|
|
pub fn for_test() -> Self {
|
|
Self(
|
|
reqwest::Client::builder()
|
|
.redirect(reqwest::redirect::Policy::none())
|
|
.build()
|
|
.expect("a client without TLS or proxy settings builds"),
|
|
)
|
|
}
|
|
|
|
#[cfg(any(test, feature = "test-support"))]
|
|
pub fn wrap_for_test(client: reqwest::Client) -> Self {
|
|
Self(client)
|
|
}
|
|
}
|
|
|
|
impl Deref for Client {
|
|
type Target = reqwest::Client;
|
|
|
|
fn deref(&self) -> &reqwest::Client {
|
|
&self.0
|
|
}
|
|
}
|