/**
 * model-routes.ts
 *
 * HTTP route handlers for model catalog discovery and global model selection.
 *
 * Routes:
 *   GET    /api/models          — list all providers + models with configured flags
 *   GET    /api/models/current  — return current model + configured status
 *   PATCH  /api/models/current  — switch current model live
 *
 * All routes require the existing daemon bearer-token auth (enforced by the
 * caller — DaemonHttpRouter.handleRequest validates auth before dispatching).
 */
import type { ProviderRegistry } from '../../providers/registry.js';
import type { ConfigManager } from '../../config/manager.js';
import type { RuntimeEventBus } from '../../runtime/events/index.js';
import type { SecretsManager } from '../../config/secrets.js';
import type { ProviderAuthRouteDescriptor } from '../../providers/interface.js';
export interface ProviderModelRef {
    readonly registryKey: string;
    readonly provider: string;
    readonly id: string;
}
export interface ProviderModelEntry {
    readonly id: string;
    readonly registryKey: string;
    readonly provider: string;
    readonly label?: string | undefined;
    readonly contextWindow?: number | undefined;
}
export type ConfiguredVia = 'env' | 'secrets' | 'subscription' | 'anonymous';
export interface ModelRouteProviderRecord {
    readonly id: string;
    readonly label: string;
    readonly configured: boolean;
    readonly configuredVia?: ConfiguredVia | undefined;
    readonly envVars: string[];
    readonly routes?: readonly ProviderAuthRouteDescriptor[] | undefined;
    readonly models: ProviderModelEntry[];
}
export interface ListProviderModelsResponse {
    readonly providers: ModelRouteProviderRecord[];
    readonly currentModel: ProviderModelRef | null;
    /**
     * `true` when the secrets manager was unavailable for this response.
     * `false` when secrets resolution was attempted.
     */
    readonly secretsResolutionSkipped: boolean;
}
export interface CurrentModelResponse {
    readonly model: ProviderModelRef | null;
    readonly configured: boolean;
    readonly configuredVia?: ConfiguredVia | undefined;
    readonly routes?: readonly ProviderAuthRouteDescriptor[] | undefined;
}
export interface PatchCurrentModelResponse extends CurrentModelResponse {
    readonly persisted: boolean;
}
export interface ModelRouteContext {
    readonly providerRegistry: ProviderRegistry;
    readonly configManager: ConfigManager;
    readonly runtimeBus: RuntimeEventBus;
    readonly parseJsonBody: (req: Request) => Promise<Record<string, unknown> | Response>;
    readonly secretsManager?: Pick<SecretsManager, 'get'> | null | undefined;
}
export declare function dispatchModelRoutes(req: Request, context: ModelRouteContext): Promise<Response | null>;
//# sourceMappingURL=model-routes.d.ts.map