From a0c9ac7bc4bf80e29979d5ae620cfacdecf5e719 Mon Sep 17 00:00:00 2001 From: xieyuanxiang <124608760@qq.com> Date: Thu, 7 May 2026 20:15:58 +0800 Subject: [PATCH] =?UTF-8?q?feat(schema):=20=E6=89=A9=E5=B1=95=20provider?= =?UTF-8?q?=20schema=20=E6=94=AF=E6=8C=81=20Token=20Plan?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - accessMode enum 新增 "token-plan" - 新增顶层 tokenPlan 属性(与 codingPlan 结构对齐) - usageTracking.method enum 新增 "credits"(Token Plan 使用 Credits 计量) - dashscope-token-plan.json 恢复语义正确的 tokenPlan 配置 --- .../coding-plans/dashscope-token-plan.json | 6 +-- manifest.json | 2 +- schemas/provider.schema.json | 51 +++++++++++++++++-- 3 files changed, 51 insertions(+), 8 deletions(-) diff --git a/compute/coding-plans/dashscope-token-plan.json b/compute/coding-plans/dashscope-token-plan.json index a469f4c..95624c0 100644 --- a/compute/coding-plans/dashscope-token-plan.json +++ b/compute/coding-plans/dashscope-token-plan.json @@ -10,16 +10,16 @@ "apiKeyVerified": false, "enabled": false, "status": "unconfigured", - "accessMode": "coding-plan", + "accessMode": "token-plan", "services": [ "chat", "reasoning", "image_gen" ], - "codingPlan": { + "tokenPlan": { "quotas": {}, "usageTracking": { - "method": "none", + "method": "credits", "consoleUrl": "https://bailian.console.aliyun.com/" } }, diff --git a/manifest.json b/manifest.json index bfafbc0..1f48cf3 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "version": "1.0.0", - "presetDataVersion": 38, + "presetDataVersion": 39, "updatedAt": "2026-05-07", "description": "DesireCore 官方配置中心" } diff --git a/schemas/provider.schema.json b/schemas/provider.schema.json index 9c4f3f9..b36eb16 100644 --- a/schemas/provider.schema.json +++ b/schemas/provider.schema.json @@ -74,8 +74,8 @@ }, "accessMode": { "type": "string", - "enum": ["api", "coding-plan"], - "description": "接入模式:api(按量付费)或 coding-plan(编程订阅套餐)" + "enum": ["api", "coding-plan", "token-plan"], + "description": "接入模式:api(按量付费)、coding-plan(编程订阅套餐)或 token-plan(Token 团队版订阅)" }, "brandGroup": { "type": "string", @@ -83,7 +83,7 @@ }, "codingPlan": { "type": "object", - "description": "Coding Plan 专属配置(仅当 accessMode = coding-plan 时有效)", + "description": "Coding Plan / Token Plan 专属配置(仅当 accessMode = coding-plan 或 token-plan 时有效)", "properties": { "planTier": { "type": "string" }, "planLabel": { "type": "string" }, @@ -102,7 +102,50 @@ "properties": { "method": { "type": "string", - "enum": ["rest-api", "response-header", "manual", "none"] + "enum": ["rest-api", "response-header", "manual", "credits", "none"] + }, + "endpoint": { "type": "string" }, + "headerKeys": { + "type": "object", + "properties": { + "remaining": { "type": "string" }, + "limit": { "type": "string" }, + "reset": { "type": "string" } + }, + "additionalProperties": false + }, + "consoleUrl": { "type": "string" } + }, + "additionalProperties": false + }, + "modelIdOverride": { "type": "string" }, + "maxConcurrent": { "type": "number", "minimum": 1 }, + "expiresAt": { "type": "string", "format": "date-time" } + }, + "additionalProperties": false + }, + "tokenPlan": { + "type": "object", + "description": "Token Plan 团队版专属配置(仅当 accessMode = token-plan 时有效)", + "properties": { + "planTier": { "type": "string" }, + "planLabel": { "type": "string" }, + "quotas": { + "type": "object", + "properties": { + "per5h": { "type": "number", "minimum": 0 }, + "perWeek": { "type": "number", "minimum": 0 }, + "perMonth": { "type": "number", "minimum": 0 }, + "per7d": { "type": "number", "minimum": 0 } + }, + "additionalProperties": false + }, + "usageTracking": { + "type": "object", + "properties": { + "method": { + "type": "string", + "enum": ["rest-api", "response-header", "manual", "credits", "none"] }, "endpoint": { "type": "string" }, "headerKeys": {