/**
 * Model provider abstraction for routing requests to the appropriate LLM provider.
 *
 * Routing priority:
 * 1. Claude OAuth: Direct requests to Anthropic API using user's OAuth token
 * 2. Standalone + OPENROUTER_API_KEY: Direct requests to OpenRouter (or custom base via OPENROUTER_BASE_URL)
 * 3. Standalone + ANTHROPIC_API_KEY: Direct requests to Anthropic API (or custom base via ANTHROPIC_BASE_URL)
 * 4. Non-standalone: Requests through LevelCode backend (which routes to OpenRouter)
 */
import type { LanguageModel } from 'ai';
/**
 * Mark Claude OAuth as rate-limited. Subsequent requests will skip Claude OAuth
 * and use LevelCode backend until the reset time.
 * @param resetAt - When the rate limit resets. If not provided, guesses 5 minutes from now.
 */
export declare function markClaudeOAuthRateLimited(resetAt?: Date): void;
/**
 * Check if Claude OAuth is currently rate-limited.
 * Returns true if rate-limited and reset time hasn't passed.
 */
export declare function isClaudeOAuthRateLimited(): boolean;
/**
 * Reset the Claude OAuth rate limit cache.
 * Call this when user reconnects their Claude subscription.
 */
export declare function resetClaudeOAuthRateLimit(): void;
/**
 * Fetch the rate limit reset time from Anthropic's quota API.
 * Returns the earliest reset time (whichever limit is more restrictive).
 * Returns null if fetch fails or no reset time is available.
 */
export declare function fetchClaudeOAuthResetTime(accessToken: string): Promise<Date | null>;
/**
 * Parameters for requesting a model.
 */
export interface ModelRequestParams {
    /** LevelCode API key for backend authentication */
    apiKey: string;
    /** Model ID (OpenRouter format, e.g., "anthropic/claude-sonnet-4") */
    model: string;
    /** If true, skip Claude OAuth and use LevelCode backend (for fallback after rate limit) */
    skipClaudeOAuth?: boolean;
}
/**
 * Result from getModelForRequest.
 */
export interface ModelResult {
    /** The language model to use for requests */
    model: LanguageModel;
    /** Whether this model uses Claude OAuth direct (affects cost tracking) */
    isClaudeOAuth: boolean;
}
/**
 * Get the appropriate model for a request.
 *
 * If Claude OAuth credentials are available and the model is a Claude model,
 * returns an Anthropic direct model. Otherwise, returns the LevelCode backend model.
 *
 * This function is async because it may need to refresh the OAuth token.
 */
export declare function getModelForRequest(params: ModelRequestParams): Promise<ModelResult>;
