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
use std::sync::Arc;
use litellm_auth_gcp::{GoogleCredentials, VertexConfig};
use litellm_auth_types::{InputSource, Sourced};
use litellm_core_utils::settings::Lookup;
use litellm_secrets_types::SecretValue;
pub(crate) fn credentials(
project: Option<String>,
credentials: Option<SecretValue>,
environment: Arc<dyn Lookup + Send + Sync>,
) -> GoogleCredentials {
GoogleCredentials::new(
VertexConfig::new(
credentials.map(|value| Sourced::new(value, InputSource::Environment)),
project,
None,
),
Arc::new(move |name| environment.get(name)),
)
}