import type { ModelInfo } from "./types.js"; export declare const CLAUDE_EFFORT_LEVELS: string[]; export declare const CLAUDE_ALIAS_IDS: readonly ["opus", "sonnet", "fable"]; export interface ClaudeModelDiscovery { defaultModel?: string; models: ModelInfo[]; } type FetchLike = (input: string, init?: Record) => Promise<{ ok: boolean; status: number; statusText: string; json(): Promise; }>; export declare function normalizeClaudeEffortLevels(levels: readonly string[] | undefined): string[]; export declare function knownClaudeModels(pinned?: string, effortLevels?: readonly string[]): ClaudeModelDiscovery; export declare function parseAnthropicModels(payload: unknown, options?: { effortLevels?: readonly string[]; }): ClaudeModelDiscovery; export declare function claudeFallbackCandidates(models: ModelInfo[], failedModel: string | undefined): string[]; export declare function parseClaudeEffortLevels(helpText: string): string[]; export declare function discoverClaudeEffortLevels(bin: string): Promise; /** * Parse an unexpired access token out of a Claude Code credentials blob. The * same JSON shape is stored in the macOS Keychain and in the plaintext * credentials file, so both sources share this parser. */ export declare function claudeTokenFromCredentialsJson(raw: string): string | undefined; export interface ReadClaudeOAuthTokenOptions { home?: string; /** Overridable so tests can exercise the darwin branch on any host. */ platform?: NodeJS.Platform; /** Overridable so tests never shell out to the real Keychain. */ readKeychain?: () => Promise; } /** * Resolve the Claude Code OAuth token, in precedence order: * 1. $CLAUDE_CODE_OAUTH_TOKEN * 2. the macOS login Keychain (where Claude Code stores credentials on darwin) * 3. the plaintext ~/.claude/.credentials.json (Linux, and older installs) * * Step 2 is why this is async. Omitting it made every Claude model discovery * return zero models on a stock macOS install — Claude Code does not write the * credentials file there — which silently degraded the model catalog to the * hardcoded " (Latest)" offline labels. This is the single reader for * the whole codebase; engine-limits.ts previously kept a second, divergent copy. */ export declare function readClaudeOAuthToken(options?: ReadClaudeOAuthTokenOptions): Promise; export declare function discoverClaudeModels(options?: { token?: string; fetchImpl?: FetchLike; endpoint?: string; effortLevels?: readonly string[]; }): Promise; export {}; //# sourceMappingURL=claude-models.d.ts.map