feat(compute): 新增 GitHub Copilot 订阅 Provider 预设 (#90)

- compute/providers/github-copilot.json:coding-plan + credentialSource
  github-copilot,models 留空(可用集合随订阅档位与组织策略变化,由客户端
  登录后经 /models 动态发现)
- schemas/provider.schema.json:credentialSource 枚举登记 github-copilot 及其语义
- _index.json 顺序追加;manifest presetDataVersion 105 → 106
- 测试计价归属表登记 github-copilot(USD)

Co-authored-by: yi-ge <jackyoncode@gmail.com>
This commit is contained in:
2026-08-31 02:16:30 -04:00
committed by GitHub
parent 59743a99b4
commit 9f331d3f78
5 changed files with 34 additions and 4 deletions

View File

@@ -446,6 +446,7 @@ describe('真实数据全量校验', () => {
cohere: 'USD',
dashscope: 'CNY',
deepseek: 'CNY',
'github-copilot': 'USD',
google: 'USD',
kling: 'CNY',
'local-whisper': 'USD',

View File

@@ -5,6 +5,7 @@
"openai-codex",
"anthropic",
"anthropic-claude",
"github-copilot",
"deepseek",
"dashscope",
"volcengine",

View File

@@ -0,0 +1,28 @@
{
"id": "provider-github-copilot-plan-001",
"provider": "github-copilot",
"brandGroup": "github",
"label": "GitHub Copilot 订阅",
"baseUrl": "https://api.githubcopilot.com",
"apiFormat": "openai-completions",
"apiKeyRef": "github-copilot-session-token",
"apiKeyVerified": false,
"enabled": false,
"status": "unconfigured",
"priceCurrency": "USD",
"accessMode": "coding-plan",
"credentialSource": "github-copilot",
"requiredClientVersion": "10.0.132",
"codingPlan": {
"quotas": {},
"usageTracking": {
"method": "none",
"consoleUrl": "https://github.com/settings/copilot/features"
}
},
"services": [
"chat",
"reasoning"
],
"models": []
}

View File

@@ -1,6 +1,6 @@
{
"version": "1.0.0",
"presetDataVersion": 105,
"updatedAt": "2026-08-28",
"presetDataVersion": 106,
"updatedAt": "2026-08-31",
"description": "DesireCore 官方配置中心"
}

View File

@@ -83,8 +83,8 @@
},
"credentialSource": {
"type": "string",
"enum": ["codex-cli", "claude-oauth"],
"description": "凭证托管来源。codex-cli密钥由客户端本地 Codex CLI 凭证检测器托管(读取 ~/.codex/auth.json 自动刷新写回fresh token 同步 secrets.json。claude-oauthClaude 订阅接入,由客户端 claude-auth 检测器托管——首选复用本机 Claude Code 登录Agent SDK 自读,不写不刷新),或应用内 OAuth / setup-token 兜底;模型调用经 compat-proxy 内 claude-agent-sdk 后端履约,不直连。需 requiredClientVersion ≥ 引入此字段的客户端版本——老客户端不识别本字段,必须先发版铺开 compute.json 韧性(容忍未知字段)再推送本数据"
"enum": ["codex-cli", "claude-oauth", "github-copilot"],
"description": "凭证托管来源。codex-cli密钥由客户端本地 Codex CLI 凭证检测器托管(读取 ~/.codex/auth.json 自动刷新写回fresh token 同步 secrets.json。claude-oauthClaude 订阅接入,由客户端 claude-auth 检测器托管——首选复用本机 Claude Code 登录Agent SDK 自读,不写不刷新),或应用内 OAuth / setup-token 兜底;模型调用经 compat-proxy 内 claude-agent-sdk 后端履约,不直连。github-copilotGitHub Copilot 订阅接入,由客户端 copilot-auth 检测器托管——GitHub Device Flow 登录,长期 GitHub OAuth token 存 config/copilot-oauth.json定期交换约 30 分钟有效的 Copilot session token 写入 secrets.json模型调用携带 Copilot 协议 headers 直连交换响应 endpoints.api 指定域名,模型列表由客户端在登录后经 /models 动态发现(可用集合随订阅档位与组织策略变化,故预设 models 为空)。需 requiredClientVersion ≥ 引入此字段的客户端版本——老客户端不识别本字段,必须先发版铺开 compute.json 韧性(容忍未知字段)再推送本数据"
},
"codingPlan": {
"type": "object",