import type { Effort } from "@oh-my-pi/pi-catalog/effort"; import type { AnthropicOptions } from "./providers/anthropic"; import type { GoogleOptions } from "./providers/google"; import type { GoogleGeminiCliOptions } from "./providers/google-gemini-cli"; import type { GoogleVertexOptions } from "./providers/google-vertex"; import type { Api, AssistantMessage, Context, Model, OptionsForApi, SimpleStreamOptions, ToolChoice } from "./types"; import { AssistantMessageEventStream } from "./utils/event-stream"; export declare function configureProviderMaxInFlightRequests(limits: Record | undefined): void; export declare const __providerInFlightForTesting: { setRoot(root: string | undefined): void; providerDir(provider: string): string; lockDir(provider: string): string; captureStaleLockRelease(provider: string): Promise<(() => Promise) | null>; captureLockDirRelease(provider: string): Promise<(() => Promise) | null>; }; /** * Get API key for provider from known environment variables, e.g. OPENAI_API_KEY. * * Will not return API keys for providers that require OAuth tokens. * Checks Bun.env, then cwd/.env, then ~/.env. */ export declare function getEnvApiKey(provider: string): string | undefined; /** * Name of the environment variable that backs `getEnvApiKey` for a provider, * when that provider maps to a single named variable (e.g. `github-copilot` → * `COPILOT_GITHUB_TOKEN`). Returns undefined for providers whose env fallback * is computed (multi-var pickers, Vertex ADC / Bedrock probes, …) since no * single variable name describes the source. */ export declare function getEnvApiKeyName(provider: string): string | undefined; /** * Enumerate every provider that has an env-var fallback for `getEnvApiKey`. * Used by `omp auth-broker migrate --include-env` to discover env-sourced keys * that should be uploaded to the broker. */ export declare function listProvidersWithEnvKey(): string[]; export declare function stream(model: Model, context: Context, options?: OptionsForApi): AssistantMessageEventStream; export declare function complete(model: Model, context: Context, options?: OptionsForApi): Promise; export declare function streamSimple(model: Model, context: Context, options?: SimpleStreamOptions): AssistantMessageEventStream; export declare function completeSimple(model: Model, context: Context, options?: SimpleStreamOptions): Promise; export declare const OUTPUT_FALLBACK_BUFFER = 4000; export declare const ANTHROPIC_THINKING: Record; export declare function mapAnthropicToolChoice(choice?: ToolChoice): AnthropicOptions["toolChoice"]; export declare function mapGoogleToolChoice(choice?: ToolChoice): GoogleOptions["toolChoice"] | GoogleGeminiCliOptions["toolChoice"] | GoogleVertexOptions["toolChoice"];