Skip to main content

raqeem_core/
provider.rs

1//! Backend presets. Every supported transcription server speaks the same
2//! OpenAI-compatible multipart `/audio/transcriptions` shape, so a "provider"
3//! is just a label + the defaults ([`crate::Endpoint`] carries the actual
4//! URL / auth / model). Adding a backend = adding a variant here and a
5//! constructor on `Endpoint` — see `.claude/skills/add-endpoint-adapter`.
6
7/// A known transcription backend.
8#[derive(Debug, Clone, Copy, PartialEq, Eq)]
9pub enum Provider {
10    /// Cohere's hosted API — `https://api.cohere.com/v2/audio/transcriptions`.
11    Cohere,
12    /// Any self-hosted OpenAI-compatible server (e.g. vLLM at
13    /// `/v1/audio/transcriptions`), reached via an explicit URL.
14    OpenAiCompatible,
15}
16
17impl Provider {
18    /// Stable machine-readable tag, recorded on every [`crate::Transcript`].
19    pub fn as_str(self) -> &'static str {
20        match self {
21            Provider::Cohere => "cohere",
22            Provider::OpenAiCompatible => "openai-compatible",
23        }
24    }
25}