pub enum AiBinding {
Bedrock(BedrockAiBinding),
Vertex(VertexAiBinding),
Foundry(FoundryAiBinding),
External(ExternalAiBinding),
}Expand description
Represents an AI Gateway binding for managed inference across cloud providers.
The managed variants (Bedrock/Vertex/Foundry) carry only identifiers and
endpoints; authentication uses the workload’s ambient cloud identity. The
External (BYO-key) variant deliberately carries a vault-resolved API key.
Variants§
Bedrock(BedrockAiBinding)
AWS Bedrock AI binding
Vertex(VertexAiBinding)
GCP Vertex AI binding
Foundry(FoundryAiBinding)
Azure AI Foundry binding
External(ExternalAiBinding)
External provider binding (generic endpoint-based)
Implementations§
Source§impl AiBinding
impl AiBinding
Sourcepub const LOCAL_API_KEY_ENV: &'static str = "OPENAI_API_KEY"
pub const LOCAL_API_KEY_ENV: &'static str = "OPENAI_API_KEY"
The env var a developer sets to bring their own provider key on the Local platform. Shared by the Local controller (provision-time check) and the local bindings resolver (runtime-only re-resolution), so the two never drift.
Sourcepub const LOCAL_DEFAULT_PROVIDER: &'static str = "openai"
pub const LOCAL_DEFAULT_PROVIDER: &'static str = "openai"
The BYO-key provider assumed on the Local platform.
pub fn bedrock(region: impl Into<String>) -> Self
pub fn vertex(project: impl Into<String>, location: impl Into<String>) -> Self
pub fn foundry(endpoint: impl Into<String>, account: impl Into<String>) -> Self
pub fn external( provider: impl Into<String>, api_key: impl Into<BindingValue<String>>, ) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AiBinding
impl<'de> Deserialize<'de> for AiBinding
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for AiBinding
impl StructuralPartialEq for AiBinding
Auto Trait Implementations§
impl Freeze for AiBinding
impl RefUnwindSafe for AiBinding
impl Send for AiBinding
impl Sync for AiBinding
impl Unpin for AiBinding
impl UnsafeUnpin for AiBinding
impl UnwindSafe for AiBinding
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.