feat: add AnyRouter presets and update endpoints

- Add AnyRouter provider presets for Claude and Codex with endpoint candidates and base_url
- Simplify PackyCode endpoint candidates to primary domain + SLB for both Claude and Codex
- Set default OPENAI_API_KEY to empty in Codex presets for safety (no placeholder key)
- Update model placeholders to GLM-4.6 / GLM-4.5-Air in en/zh locales
This commit is contained in:
Jason
2025-10-23 16:53:42 +08:00
parent e38ff843e7
commit 6cc75d5c24
4 changed files with 44 additions and 13 deletions

View File

@@ -25,7 +25,7 @@ export interface CodexProviderPreset {
*/
export function generateThirdPartyAuth(apiKey: string): Record<string, any> {
return {
OPENAI_API_KEY: apiKey || "sk-your-api-key-here",
OPENAI_API_KEY: apiKey || "",
};
}
@@ -74,7 +74,7 @@ export const codexProviderPresets: CodexProviderPreset[] = [
name: "PackyCode",
websiteUrl: "https://codex.packycode.com/",
category: "third_party",
auth: generateThirdPartyAuth("sk-your-api-key-here"),
auth: generateThirdPartyAuth(""),
config: generateThirdPartyConfig(
"packycode",
"https://codex-api.packycode.com/v1",
@@ -83,8 +83,24 @@ export const codexProviderPresets: CodexProviderPreset[] = [
// Codex 请求地址候选(用于地址管理/测速)
endpointCandidates: [
"https://codex-api.packycode.com/v1",
"https://codex-api-hk-cn2.packycode.com/v1",
"https://codex-api-hk-cdn.packycode.com/v1",
"https://codex-api-slb.packycode.com/v1",
],
},
{
name: "AnyRouter",
websiteUrl: "https://anyrouter.top",
category: "third_party",
auth: generateThirdPartyAuth(""),
config: generateThirdPartyConfig(
"anyrouter",
"https://anyrouter.top",
"gpt-5-codex",
),
// Codex 请求地址候选(用于地址管理/测速)
endpointCandidates: [
"https://anyrouter.top",
"https://q.quuvv.cn",
"https://pmpjfbhq.cn-nb1.rainapp.top",
],
},
];

View File

@@ -167,7 +167,7 @@ export const providerPresets: ProviderPreset[] = [
{
name: "PackyCode",
websiteUrl: "https://www.packycode.com",
apiKeyUrl: "https://www.packycode.com/?aff=rlo54mgz",
apiKeyUrl: "https://www.packycode.com/",
settingsConfig: {
env: {
ANTHROPIC_BASE_URL: "https://api.packycode.com",
@@ -177,10 +177,25 @@ export const providerPresets: ProviderPreset[] = [
// 请求地址候选(用于地址管理/测速)
endpointCandidates: [
"https://api.packycode.com",
"https://api-hk-cn2.packycode.com",
"https://api-hk-g.packycode.com",
"https://api-us-cn2.packycode.com",
"https://api-cf-pro.packycode.com",
"https://api-slb.packycode.com",
],
category: "third_party",
},
{
name: "AnyRouter",
websiteUrl: "https://anyrouter.top",
apiKeyUrl: "https://anyrouter.top/register?aff=PCel",
settingsConfig: {
env: {
ANTHROPIC_BASE_URL: "https://anyrouter.top",
ANTHROPIC_AUTH_TOKEN: "",
},
},
// 请求地址候选(用于地址管理/测速)
endpointCandidates: [
"https://q.quuvv.cn",
"https://pmpjfbhq.cn-nb1.rainapp.top",
"https://anyrouter.top",
],
category: "third_party",
},

View File

@@ -239,8 +239,8 @@
"visitWebsite": "Visit {{url}}",
"anthropicModel": "Main Model",
"anthropicSmallFastModel": "Fast Model",
"modelPlaceholder": "claude-3-7-sonnet-20250219",
"smallModelPlaceholder": "claude-3-5-haiku-20241022",
"modelPlaceholder": "GLM-4.6",
"smallModelPlaceholder": "GLM-4.5-Air",
"modelHelper": "Optional: Specify default Claude model to use, leave blank to use system default.",
"categoryOfficial": "Official",
"categoryCnOfficial": "Opensource Official",

View File

@@ -239,8 +239,8 @@
"visitWebsite": "访问 {{url}}",
"anthropicModel": "主模型",
"anthropicSmallFastModel": "快速模型",
"modelPlaceholder": "claude-3-7-sonnet-20250219",
"smallModelPlaceholder": "claude-3-5-haiku-20241022",
"modelPlaceholder": "GLM-4.6",
"smallModelPlaceholder": "GLM-4.5-Air",
"modelHelper": "可选:指定默认使用的 Claude 模型,留空则使用系统默认。",
"categoryOfficial": "官方",
"categoryCnOfficial": "开源官方",