feat: 按模型上下文自动配置智能体压缩阈值

- 从 llm.json 解析上下文与输出上限,并增强短模型 ID 匹配

- 切换模型、保存和试运行时按预算公式重算,目录缺失时回退 30K

- 修复模型列表接口未返回能力元数据
This commit is contained in:
2026-07-30 14:20:10 +08:00
parent 5f11219226
commit c78074a969
14 changed files with 410 additions and 23 deletions

View File

@@ -43,6 +43,8 @@ export interface ModelCapabilityResolution {
detected: boolean;
modelType: 'chatModel' | 'embeddingModel' | 'rerankModel';
source: ModelCapabilitySource;
contextWindowTokens?: null | number;
maxOutputTokens?: null | number;
supportImage?: boolean | null;
supportThinking?: boolean | null;
supportTool?: boolean | null;
@@ -141,6 +143,8 @@ export interface llmType {
providerId?: string;
title: string;
modelName?: string;
contextWindowTokens?: null | number;
maxOutputTokens?: null | number;
modelProvider: {
icon: string;
providerName: string;