import type { LanguageModelV1 } from '@ai-sdk/provider';
import { type YagrModelCapabilityProfile } from './model-capabilities.js';
export declare const OPENAI_ACCOUNT_BASE_URL = "https://chatgpt.com/backend-api";
export declare const OPENAI_ACCOUNT_DEFAULT_MODEL = "gpt-5.1-codex-mini";
/** Known models served by the ChatGPT Codex backend (chatgpt.com/backend-api). */
export declare const KNOWN_CODEX_MODELS: string[];
export interface CodexAuthChallenge {
    authUrl: string;
    callbackServerStarted: boolean;
}
export declare function beginCodexAuth(): Promise<CodexAuthChallenge>;
export declare function completeCodexAuth(): Promise<OpenAiAccountSession>;
export interface OpenAiAccountSession {
    accessToken: string;
    refreshToken?: string;
    email?: string;
    /** Always 'codex' — session is read from the Codex CLI auth file. */
    source: 'codex';
}
/** Path to the Codex CLI auth file. Override with YAGR_CODEX_AUTH_PATH for tests. */
export declare function getCodexAuthPath(): string;
export declare function getOpenAiAccountSession(): OpenAiAccountSession | undefined;
export declare function ensureOpenAiAccountSession(): Promise<OpenAiAccountSession | undefined>;
/** Returns the static list of models available on the ChatGPT Codex backend.
 *  The backend-api has no public `/models` endpoint, so the list is hardcoded
 *  from the known model registry. */
export declare function fetchOpenAiAccountModels(_accessToken: string): Promise<string[]>;
export declare function validateOpenAiAccountRuntime(modelId?: string): Promise<{
    ok: boolean;
    text?: string;
    error?: string;
}>;
export declare function createOpenAiAccountLanguageModel(modelId: string, capabilityProfile?: YagrModelCapabilityProfile): LanguageModelV1;
//# sourceMappingURL=openai-account.d.ts.map