import { type LanguageModel } from "ai"; import { type Platform } from "../config/global-config"; export type { Platform }; export interface ModelInfo { name: string; plans: string[]; category: string; } export interface LLMConfig { platform: Platform; apiKey: string; workspaceId: string; modelName: string; baseUrl: string; } declare let PLATFORM: Platform; declare let API_KEY: string; declare let WORKSPACE_ID: string; declare let MODEL_NAME: string; declare let BASE_URL: string; declare let dashscopeProvider: import("@ai-sdk/openai").OpenAIProvider; /** * 当前被所有 `import { model }` 消费的 LanguageModel 实例。 * ESM 的活绑定语义:当下面 setLLMConfig 对 `model` 重新赋值时, * 所有已经 import 的引用都会看到新值。 */ export declare let model: LanguageModel; /** * 读取当前 LLM 配置快照(CLI BANNER / VSCode 状态查看等使用)。 */ export declare function getLLMConfig(): LLMConfig; /** * 局部覆盖 LLM 配置。未提供字段保持当前值。 * platform 变化时按新 platform 重算 baseUrl(qianwen 忽略 workspaceId)。 * 主要调用者:VSCode 扩展初始化 & 配置变更回调;CLI /platform /model 命令。 */ export declare function setLLMConfig(partial: Partial>): LLMConfig; /** * 拉取平台可用模型列表。 * - qianwen / bailian:GET dashscope deployments/models API * - anthropic:返回硬编码的官方常用模型列表(截至 2025-04 Anthropic 无 OpenAI 兼容的 models 公开 API) * 返回模型名 + plans 类型(ptu_v2/mu/cu 或 anthropic 版本标记)+ 分类。 * 注:API 仅返回部署方案类型,无 token 调用单价。 */ export declare function listAvailableModels(): Promise; /** 按 model_name 关键词分类,便于 /model 命令分组展示。导出供测试验证。 */ export declare function classifyModel(name: string): string; export { dashscopeProvider, API_KEY, WORKSPACE_ID, MODEL_NAME, BASE_URL, PLATFORM }; //# sourceMappingURL=client.d.ts.map