pub struct Ai {
pub id: String,
pub models: Vec<AiModel>,
}Expand description
Represents an AI Gateway resource that provides a unified interface to managed AI inference services across cloud providers.
BYO-key external providers (OpenAI/Anthropic) are NOT declared here. Like any
other BYO infrastructure (e.g. external Redis for kv), an external AI
provider is supplied at deploy time as an ExternalBinding::Ai in the
stack’s external-bindings map; the executor then skips the cloud controller.
Fields§
§id: StringIdentifier for the AI resource. Must contain only alphanumeric characters, hyphens, and underscores ([A-Za-z0-9-_]). Maximum 64 characters.
models: Vec<AiModel>The models the app calls. A deployment checks that the cloud lets it use each one. Omitted from the serialized stack when empty, so existing stacks do not change.
Implementations§
Source§impl Ai
impl Ai
Sourcepub const RESOURCE_TYPE: ResourceType
pub const RESOURCE_TYPE: ResourceType
The resource type identifier for AI Gateway
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Ai
impl<'de> Deserialize<'de> for Ai
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>,
impl Eq for Ai
Source§impl ResourceDefinition for Ai
impl ResourceDefinition for Ai
Source§fn get_resource_type(&self) -> ResourceType
fn get_resource_type(&self) -> ResourceType
Source§fn get_dependencies(&self) -> Vec<ResourceRef>
fn get_dependencies(&self) -> Vec<ResourceRef>
Source§fn validate_update(&self, new_config: &dyn ResourceDefinition) -> Result<()>
fn validate_update(&self, new_config: &dyn ResourceDefinition) -> Result<()>
Source§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Source§fn box_clone(&self) -> Box<dyn ResourceDefinition>
fn box_clone(&self) -> Box<dyn ResourceDefinition>
Source§fn resource_eq(&self, other: &dyn ResourceDefinition) -> bool
fn resource_eq(&self, other: &dyn ResourceDefinition) -> bool
Source§fn to_json_value(&self) -> Result<Value>
fn to_json_value(&self) -> Result<Value>
Source§fn get_permissions(&self) -> Option<&str>
fn get_permissions(&self) -> Option<&str>
Source§fn replace_after_failed_create_is_safe(&self) -> bool
fn replace_after_failed_create_is_safe(&self) -> bool
impl StructuralPartialEq for Ai
Auto Trait Implementations§
impl Forget for Ai
impl Freeze for Ai
impl Move for Ai
impl RefUnwindSafe for Ai
impl Send for Ai
impl Sync for Ai
impl Unpin for Ai
impl UnsafeUnpin for Ai
impl UnwindSafe for Ai
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
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
key and return true if they are equal.