import { type ResponseFormat } from "./openai.js"; /** * Three shapes rather than a list of vendors: Gemini's own API, OpenAI's own * API, and the `/chat/completions` shape everyone else copied from it. * * OpenAI is separate from the servers that copied it because the two have * drifted: it renamed the output limit to `max_completion_tokens` and its * newer models reject `max_tokens`, which is the only spelling DeepSeek, * Ollama and llama.cpp know. Everything else about the request is shared, and * a new vendor still needs no code here — only a `--base-url`. */ export declare const PROVIDER_IDS: readonly ["gemini", "openai", "openai-compatible"]; export type ProviderId = (typeof PROVIDER_IDS)[number]; export declare const isProviderId: (value: string) => value is ProviderId; export type Provider = { id: ProviderId; model: string; apiKey: string; baseUrl: string; }; export type Turn = { role: "user" | "model"; text: string; }; export type JsonCompletion = { system: string; turns: readonly Turn[]; maxOutputTokens: number; /** Undefined sends none, for models that accept only their own default. */ temperature: number | undefined; }; type ProviderDefaults = { apiKeyEnv: string; baseUrl: string | undefined; model: string | undefined; }; export declare const providerDefaults: (id: ProviderId) => ProviderDefaults; export type ProviderOptions = { id: ProviderId; model: string | undefined; baseUrl: string | undefined; apiKeyEnv: string | undefined; }; /** * The key is read from the environment and never accepted as an argument: a * flag would land in shell history and in a CI log line. */ export declare const resolveProvider: (options: ProviderOptions, env: Record) => Provider; export declare const completeJson: (provider: Provider, request: JsonCompletion, responseFormat?: ResponseFormat) => Promise; export {}; //# sourceMappingURL=index.d.ts.map