- 支持 Claude Desktop 使用 Copilot/Codex OAuth 供应商

- 放开本地路由托管 OAuth 供应商校验,允许动态 Token
- 新增 Claude Desktop Copilot/Codex 预设与账号选择
- 添加 OAuth proxy 回归测试
This commit is contained in:
Jason
2026-05-12 11:30:11 +08:00
parent 953b7cdcf9
commit 6a3c2fe0ba
5 changed files with 209 additions and 60 deletions
@@ -38,6 +38,8 @@ export interface ClaudeDesktopProviderPreset {
mode: "direct" | "proxy";
apiFormat?: ClaudeDesktopApiFormat;
modelRoutes?: ClaudeDesktopRoutePreset[];
providerType?: "github_copilot" | "codex_oauth";
requiresOAuth?: boolean;
endpointCandidates?: string[];
theme?: PresetTheme;
@@ -155,6 +157,36 @@ export const claudeDesktopProviderPresets: ClaudeDesktopProviderPreset[] = [
icon: "gemini",
iconColor: "#4285F4",
},
{
name: "GitHub Copilot",
websiteUrl: "https://github.com/features/copilot",
category: "third_party",
baseUrl: "https://api.githubcopilot.com",
mode: "proxy",
apiFormat: "openai_chat",
providerType: "github_copilot",
requiresOAuth: true,
modelRoutes: brandedRoutes(
"claude-sonnet-4.6",
"claude-sonnet-4.6",
"claude-haiku-4.5",
),
icon: "github",
iconColor: "#000000",
},
{
name: "Codex",
websiteUrl: "https://openai.com/chatgpt/pricing",
category: "third_party",
baseUrl: "https://chatgpt.com/backend-api/codex",
mode: "proxy",
apiFormat: "openai_responses",
providerType: "codex_oauth",
requiresOAuth: true,
modelRoutes: brandedRoutes("gpt-5.4", "gpt-5.4", "gpt-5.4-mini"),
icon: "openai",
iconColor: "#000000",
},
{
name: "DeepSeek",
websiteUrl: "https://platform.deepseek.com",