import type { OpencodeClient as SdkOpencodeClient } from '@opencode-ai/sdk'; import type { OpencodeRuntimeConfig, OpencodeAgentInfo } from './client.js'; export interface ProvidersDeps { getClient: () => SdkOpencodeClient | null; } export declare class ProvidersManager { private deps; constructor(deps: ProvidersDeps); private getClient; getProviders(): Promise<{ providers: Array<{ id: string; name: string; models: Array<{ id: string; name: string; }>; }>; default: Record; }>; /** * 获取 opencode 提供的 providers 完整数据(含 capabilities) * * 与 {@link getProviders} 的区别:后者为了兼容历史调用点做了强类型窄化, * 丢掉了 `capabilities.input.image` 等关键字段。本方法返回 SDK 原始 shape, * 供能力嗅探 / vision 模型枚举等场景使用。 */ getProvidersFull(): Promise<{ providers: Array>; default: Record; }>; /** * 查询单个 model 的 capabilities。 * * @returns `{ input, attachment, ... }` 结构;若 provider/model 未找到或数据缺失,返回 `null` * —— 调用方应据此采用"乐观"或"悲观"策略。 */ getModelCapabilities(providerId: string, modelId: string): Promise<{ input?: { text?: boolean; image?: boolean; audio?: boolean; video?: boolean; pdf?: boolean; }; output?: { text?: boolean; image?: boolean; audio?: boolean; video?: boolean; pdf?: boolean; }; attachment?: boolean; } | null>; /** * 枚举所有支持 image 输入的 model。 * * 供 Web UI 的 VISION_OCR_MODEL 下拉选择器使用。 */ listVisionModels(): Promise>; getConfig(): Promise; updateConfig(config: OpencodeRuntimeConfig): Promise; getAgents(): Promise; } //# sourceMappingURL=providers.d.ts.map