pub enum AiProviderKind {
Openai,
Anthropic,
Gemini,
A2a,
AzureOpenai,
Bedrock,
}Expand description
The wire protocol an adapter speaks (DW-075).
Variants§
Openai
OpenAI chat-completions API (POST /v1/chat/completions). Also
the dialect spoken by OpenAI-compatible servers (vLLM, Ollama’s
compatibility endpoint, Groq, DeepSeek, Mistral, Cohere, and
others) — point the upstream at one of those and this adapter
speaks to it unchanged (AI-01).
Anthropic
Anthropic messages API (POST /v1/messages).
Gemini
Google Gemini generateContent API
(POST /v1beta/models/{model}:generateContent).
A2a
DW-114: A2A (agent-to-agent) protocol. An A2A provider is a
configured ai.a2a.agents[] entry: the adapter translates a
canonical chat request into an A2A task-submit body and parses
the task response back. The task lifecycle state machine is
implemented against the A2A Protocol Specification draft (legal
and illegal transitions are enforced). Compiled into every
build (no cargo feature).
AzureOpenai
AI-01: Azure OpenAI. Uses the Azure deployment URL format
(/openai/deployments/{deployment}/chat/completions?api-version=...)
and api-key header authentication. The request/response body
is OpenAI-compatible (the adapter reuses the OpenAI body
translation and overrides the path + headers).
Bedrock
AI-01: AWS Bedrock. Uses the Bedrock invoke API
(/model/{model_id}/invoke) with AWS SigV4 request signing.
The request/response body follows the Anthropic messages format
for Claude models on Bedrock (the adapter reuses the Anthropic
body translation and overrides the path + headers). SigV4
signing is applied by the transport layer using the provider’s
configured AWS credentials.
Implementations§
Source§impl AiProviderKind
impl AiProviderKind
Sourcepub fn gen_ai_system(&self) -> &'static str
pub fn gen_ai_system(&self) -> &'static str
The OTel GenAI semantic-convention gen_ai.system value
(AI-07): the lowercase provider kind token. Used as the
gen_ai.system span attribute and never a metric label by
itself (the config-bounded provider NAME is the label).
Trait Implementations§
Source§impl Clone for AiProviderKind
impl Clone for AiProviderKind
Source§fn clone(&self) -> AiProviderKind
fn clone(&self) -> AiProviderKind
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AiProviderKind
impl Debug for AiProviderKind
Source§impl<'de> Deserialize<'de> for AiProviderKind
impl<'de> Deserialize<'de> for AiProviderKind
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>,
Source§impl JsonSchema for AiProviderKind
impl JsonSchema for AiProviderKind
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for AiProviderKind
impl PartialEq for AiProviderKind
Source§impl Serialize for AiProviderKind
impl Serialize for AiProviderKind
impl Copy for AiProviderKind
impl Eq for AiProviderKind
impl StructuralPartialEq for AiProviderKind
Auto Trait Implementations§
impl Freeze for AiProviderKind
impl RefUnwindSafe for AiProviderKind
impl Send for AiProviderKind
impl Sync for AiProviderKind
impl Unpin for AiProviderKind
impl UnwindSafe for AiProviderKind
Blanket Implementations§
§impl<T> AnyExt for T
impl<T> AnyExt for T
§fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
T behind reference§fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
T behind mutable reference§fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
T behind Rc pointer§fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
T behind Arc pointer§fn downcast_box<T>(this: Box<Self>) -> Result<Box<T>, Box<Self>>where
T: Any,
fn downcast_box<T>(this: Box<Self>) -> Result<Box<T>, Box<Self>>where
T: Any,
T behind Box pointer§fn downcast_move<T>(this: Self) -> Option<T>
fn downcast_move<T>(this: Self) -> Option<T>
Self to T,
useful only in generic context as a workaround for specializationSource§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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, X> CoerceTo<T> for Xwhere
T: CoerceFrom<X> + ?Sized,
impl<T, X> CoerceTo<T> for Xwhere
T: CoerceFrom<X> + ?Sized,
fn coerce_rc_to(self: Rc<X>) -> Rc<T>
fn coerce_box_to(self: Box<X>) -> Box<T>
fn coerce_ref_to(&self) -> &T
fn coerce_mut_to(&mut self) -> &mut T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more