src/provider_kind.rs

Codewhale · crates/config/src/provider_kind.rs · rust · MIT
ai

Enum of provider kinds with serde aliases and helper methods for config parsing.

// Source: https://github.com/Hmbown/Codewhale | License: MIT | Copyright 2024-2025 DeepSeek-TUI Contributors
// Provided via justclaw.it.com; keep this notice with the code.
//! The canonical [`ProviderKind`] enum (#3311): the set of built-in provider
//! kinds, their serde aliases, and identity helpers (`all`, `as_str`, `parse`,
//! `provider`). Extracted verbatim from `lib.rs` to separate provider identity
//! from config schema/loading; re-exported at the crate root so
//! `codewhale_config::ProviderKind` is unchanged. Behavior is identical.

use serde::{Deserialize, Serialize};

use crate::provider;

#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq, Default)]
#[serde(rename_all = "kebab-case")]
pub enum ProviderKind {
    #[default]
    #[serde(
        alias = "deep

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key