/**
 * `api + openai` strategy: direct provider HTTP API call via the official
 * OpenAI SDK using the user's API key.
 *
 * Model neutrality (per `feedback_stop_haiku_drift`): NO vendor model
 * identifier appears in this file. `cfg.model` is the user-supplied id
 * passed through to the SDK; opensquid treats it as opaque. If the user
 * leaves `cfg.model` unset, we throw — the source code never picks a
 * default.
 *
 * Auth: API key resolved via `SecretResolver`. Default URI is
 * `env:OPENAI_API_KEY`.
 *
 * Rate-limit retry: same shape as api_anthropic.ts — exponential backoff
 * (1s, 2s, 4s) on HTTP 429, max 3 retries.
 *
 * Lazy load: `openai` is an OPTIONAL peer dep.
 *
 * Test seam (`opts.sdkModule`): injects a stub OpenAI constructor module.
 *
 * Imports from: ../types.js, ../../secrets/types.js.
 * Imported by: models/dispatcher.ts.
 */
import type { SecretResolver } from '../../secrets/types.js';
import type { ModelAliasConfig, ModelStrategy } from '../types.js';
export interface OpenAIChatChoice {
    message?: {
        content?: string | null;
    };
}
export interface OpenAIChatResponse {
    choices: OpenAIChatChoice[];
}
export interface OpenAIClient {
    chat: {
        completions: {
            create: (req: {
                model: string;
                messages: {
                    role: 'user';
                    content: string;
                }[];
            }) => Promise<OpenAIChatResponse>;
        };
    };
}
export interface OpenAISdkModule {
    default: new (opts: {
        apiKey: string;
    }) => OpenAIClient;
}
export interface ApiOpenAIOptions {
    /** Test seam: inject a stub OpenAI constructor module. */
    sdkModule?: OpenAISdkModule;
}
export declare function apiOpenAIStrategy(cfg: ModelAliasConfig, secrets: SecretResolver, opts?: ApiOpenAIOptions): ModelStrategy;
//# sourceMappingURL=api_openai.d.ts.map