// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { ProviderKind } from "./ProviderKind";

/**
 * One user-added provider — OpenRouter, Anthropic, a local
 * llama.cpp / vLLM / Ollama, a hosted Anthropic-via-proxy, …
 * Persisted into [`crate::app_state::CoderAppState::providers`];
 * the API key lives in the OS keyring under
 * `service=moon-ide`, `account=coder-provider:<id>` and is never
 * surfaced in this struct — only the [`has_api_key`] flag is.
 *
 * `id` is opaque and assigned by the backend on
 * `coder_add_provider`. The picker addresses providers by id
 * across read / write / delete; `label` is a free-form human name
 * the user picked.
 *
 * [`has_api_key`]: Self::has_api_key
 */
export type CoderProviderConfig = { id: string, label: string, 
/**
 * Built-in flavour, or [`ProviderKind::Custom`] for free-form
 * entries. Defaults to `Custom` on missing so entries
 * persisted before this field existed deserialize cleanly.
 */
kind: ProviderKind, 
/**
 * Endpoint root. For `Custom` and `OpenRouter` this is the
 * OpenAI-compat `/v1` root the runner appends
 * `/chat/completions` to (e.g. `https://openrouter.ai/api/v1`,
 * `http://localhost:8080/v1`). For `Anthropic` this is the
 * API host *without* `/v1` (e.g. `https://api.anthropic.com`)
 * — the Messages API translator builds the full URL.
 */
base_url: string, 
/**
 * Per-provider standard model slug. Picker-required for
 * [`ProviderKind::OpenRouter`] and [`ProviderKind::Anthropic`]
 * (the Save button is disabled until one is picked from the
 * catalog); free-form entries can stay empty if the user
 * wants to hand-edit later, in which case the runner errors
 * at first call.
 */
standard_model: string, 
/**
 * Per-provider cheap model slug. Same semantics as
 * [`standard_model`](Self::standard_model). Empty falls back
 * to the standard slug for the same provider — the previous
 * behaviour (fall back to the HF cheap default) leaked an
 * HF-only slug onto every non-HF route.
 */
cheap_model: string, 
/**
 * `true` iff the keyring currently holds an entry for this
 * provider. Server-set, read-only on the picker's side —
 * editing the key goes through `coder_set_provider_api_key`.
 * Deserialised as `false` when the field is missing so
 * inbound shapes from the frontend don't have to set it.
 * Request-payload cap for this provider, in MB (1000-multiples).
 * Drives the image wire budget: when the outgoing request's
 * image attachments would push past ~85 % of this, the oldest
 * screenshots are elided from the wire copy (ADR 0049) —
 * nothing is deleted from the session. `None` = uncapped
 * (locally-hosted endpoints don't care). The HF route has a
 * built-in cap and ignores this field.
 */
payload_cap_mb?: number | null, has_api_key: boolean, };
