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): trim vault cert login endpoint
Yujong Leed90ff4a30b67
diff --git a/litellm-rust/crates/secrets-hashicorp/src/cert_login.rs b/litellm-rust/crates/secrets-hashicorp/src/cert_login.rsindex 1eb09a89715..f99df62db12 100644--- a/litellm-rust/crates/secrets-hashicorp/src/cert_login.rs+++ b/litellm-rust/crates/secrets-hashicorp/src/cert_login.rs@@ -3,22 +3,19 @@pub struct CertLoginRequest {#[endpoint(skip)]pub mount: String,- #[endpoint(skip)]- #[allow(dead_code)]- pub name: Option<String>,#[endpoint(raw)]body: Vec<u8>,}impl CertLoginRequest {- pub fn new(name: Option<String>) -> Self {- let body: Vec<u8> = match name.as_deref() {- Some(name) => serde_json::to_vec(&serde_json::json!({ "name": name })).unwrap(),+ pub fn new(name: Option<&str>) -> Self {+ let body: Vec<u8> = match name {+ Some(name) => serde_json::to_vec(&serde_json::json!({ "name": name }))+ .expect("json object serialization is infallible"),None => b"{}".to_vec(),};Self {mount: "cert".to_owned(),- name,body,}}diff --git a/litellm-rust/crates/secrets-hashicorp/src/secret_manager.rs b/litellm-rust/crates/secrets-hashicorp/src/secret_manager.rsindex 7937fa93f8f..3ad9a549438 100644--- a/litellm-rust/crates/secrets-hashicorp/src/secret_manager.rs+++ b/litellm-rust/crates/secrets-hashicorp/src/secret_manager.rs@@ -207,7 +207,7 @@ impl HashicorpVault {(None, Some(tls)) => {let login_client: VaultClient =self.build_client(self.config.login_namespace(), "")?;- let endpoint: CertLoginRequest = CertLoginRequest::new(tls.role.clone());+ let endpoint: CertLoginRequest = CertLoginRequest::new(tls.role.as_deref());let auth = api::auth(&login_client, endpoint).await.map_err(|error| map_api_error(error, ErrorContext::Login))?;