#[non_exhaustive]pub enum Api {
Show 15 variants
OpenAiCompletions,
OpenAiResponses,
OpenRouter,
OpenAiCodexResponses,
AzureOpenAiResponses,
AnthropicMessages,
BedrockConverseStream,
GoogleGenerativeAi,
GoogleGeminiCli,
GoogleVertex,
OllamaChat,
CursorAgent,
GitLabDuo,
GitLabDuoAgent,
DevinAgent,
}Expand description
Provider API identifier.
Selects the wire-format / protocol dialect spoken to a particular LLM provider.
Moved to the oxicode-catalog crate (omp aligns KnownApi with pi-catalog).
Re-exported here for backward compatibility; new code should use
oxicode_catalog::Api directly.
Provider API identifier.
Selects the wire-format / protocol dialect spoken to a particular LLM
provider. The canonical 14 KnownApi dialects from omp; Mistral is
intentionally absent — omp treats Mistral as openai-completions-compatible
(no separate dialect).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
OpenAiCompletions
OpenAI Chat Completions API (also: Mistral, DeepSeek, Together, …).
OpenAiResponses
OpenAI Responses API.
OpenRouter
OpenRouter.
OpenAiCodexResponses
OpenAI Codex Responses API.
AzureOpenAiResponses
Azure OpenAI Responses API.
AnthropicMessages
Anthropic Messages API.
BedrockConverseStream
AWS Bedrock Converse Stream API.
GoogleGenerativeAi
Google Generative AI (Gemini) API.
GoogleGeminiCli
Google Gemini CLI (remote-AGENT protocol).
GoogleVertex
Google Vertex AI endpoint.
OllamaChat
Ollama chat API (local server).
CursorAgent
Cursor (remote-AGENT protocol).
GitLabDuo
GitLab Duo REST proxy (AI Gateway — delegates to Anthropic/OpenAI).
GitLabDuoAgent
GitLab Duo Agent (WebSocket workflow protocol).
DevinAgent
Devin (remote-AGENT protocol).
Implementations§
Source§impl Api
impl Api
Sourcepub fn from_kebab_str(s: &str) -> Option<Api>
pub fn from_kebab_str(s: &str) -> Option<Api>
Parse a kebab-case dialect string (omp KnownApi serialization) into
an Api. Returns None for unrecognized strings — the single
authoritative parser (callers decide the fallback, e.g.
OpenAI-compatible default for unknown gateways/aggregators).
This exists so the dialect↔string mapping lives with the enum (not
duplicated as stale parse_api matches across crates that miss new
variants).
Trait Implementations§
impl Copy for Api
Source§impl<'de> Deserialize<'de> for Api
impl<'de> Deserialize<'de> for Api
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Api, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Api, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for Api
Source§impl Serialize for Api
impl Serialize for Api
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for Api
Auto Trait Implementations§
impl Freeze for Api
impl RefUnwindSafe for Api
impl Send for Api
impl Sync for Api
impl Unpin for Api
impl UnsafeUnpin for Api
impl UnwindSafe for Api
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.