pub struct DriverDescriptor {
pub id: DriverId,
pub display_name: String,
pub services: Vec<ServiceKind>,
pub credential_schema: CredentialFormSchema,
pub oauth: Option<DriverOAuthConfig>,
pub chat: Option<DriverFactory>,
pub embeddings: Option<EmbeddingsDriverFactory>,
}Expand description
A registered provider driver: identity, declared services, the credential shape its providers must supply, and per-service factories.
The descriptor is the code-side unit of the providers domain model (specs/providers.md): one descriptor per driver id, instantiated as many org-scoped providers.
Fields§
§id: DriverIdDriver id (also the registry key).
display_name: StringHuman-readable driver name (e.g. “OpenAI”, “AWS Bedrock”).
services: Vec<ServiceKind>Services this driver’s providers can power. Declared, not stored.
credential_schema: CredentialFormSchemaCredential fields a provider instance must supply.
oauth: Option<DriverOAuthConfig>Optional interactive OAuth connect flow. Some makes “Connect with
{provider}” available as an alternative to entering a key by hand.
chat: Option<DriverFactory>Chat service factory. None for drivers that only offer other services.
embeddings: Option<EmbeddingsDriverFactory>Embeddings service factory. None for drivers that do not support embeddings.
Implementations§
Source§impl DriverDescriptor
impl DriverDescriptor
Sourcepub fn chat_only<F>(id: impl Into<DriverId>, factory: F) -> Self
pub fn chat_only<F>(id: impl Into<DriverId>, factory: F) -> Self
Descriptor for a chat-only driver with the default credential schema
for the driver id (a single required api_key field for real
providers; empty for LlmSim and External, which may authenticate
via ProviderMetadata) and a display name derived from the id.
Sourcepub fn supports(&self, service: ServiceKind) -> bool
pub fn supports(&self, service: ServiceKind) -> bool
Whether the driver declares the given service.
Trait Implementations§
Source§impl Clone for DriverDescriptor
impl Clone for DriverDescriptor
Source§fn clone(&self) -> DriverDescriptor
fn clone(&self) -> DriverDescriptor
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for DriverDescriptor
impl !UnwindSafe for DriverDescriptor
impl Freeze for DriverDescriptor
impl Send for DriverDescriptor
impl Sync for DriverDescriptor
impl Unpin for DriverDescriptor
impl UnsafeUnpin for DriverDescriptor
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,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request