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:
@@ -25,7 +25,7 @@ export interface CodexProviderPreset {
|
|||||||
*/
|
*/
|
||||||
export function generateThirdPartyAuth(apiKey: string): Record<string, any> {
|
export function generateThirdPartyAuth(apiKey: string): Record<string, any> {
|
||||||
return {
|
return {
|
||||||
OPENAI_API_KEY: apiKey || "sk-your-api-key-here",
|
OPENAI_API_KEY: apiKey || "",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -74,7 +74,7 @@ export const codexProviderPresets: CodexProviderPreset[] = [
|
|||||||
name: "PackyCode",
|
name: "PackyCode",
|
||||||
websiteUrl: "https://codex.packycode.com/",
|
websiteUrl: "https://codex.packycode.com/",
|
||||||
category: "third_party",
|
category: "third_party",
|
||||||
auth: generateThirdPartyAuth("sk-your-api-key-here"),
|
auth: generateThirdPartyAuth(""),
|
||||||
config: generateThirdPartyConfig(
|
config: generateThirdPartyConfig(
|
||||||
"packycode",
|
"packycode",
|
||||||
"https://codex-api.packycode.com/v1",
|
"https://codex-api.packycode.com/v1",
|
||||||
@@ -83,8 +83,24 @@ export const codexProviderPresets: CodexProviderPreset[] = [
|
|||||||
// Codex 请求地址候选(用于地址管理/测速)
|
// Codex 请求地址候选(用于地址管理/测速)
|
||||||
endpointCandidates: [
|
endpointCandidates: [
|
||||||
"https://codex-api.packycode.com/v1",
|
"https://codex-api.packycode.com/v1",
|
||||||
"https://codex-api-hk-cn2.packycode.com/v1",
|
"https://codex-api-slb.packycode.com/v1",
|
||||||
"https://codex-api-hk-cdn.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",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ export const providerPresets: ProviderPreset[] = [
|
|||||||
{
|
{
|
||||||
name: "PackyCode",
|
name: "PackyCode",
|
||||||
websiteUrl: "https://www.packycode.com",
|
websiteUrl: "https://www.packycode.com",
|
||||||
apiKeyUrl: "https://www.packycode.com/?aff=rlo54mgz",
|
apiKeyUrl: "https://www.packycode.com/",
|
||||||
settingsConfig: {
|
settingsConfig: {
|
||||||
env: {
|
env: {
|
||||||
ANTHROPIC_BASE_URL: "https://api.packycode.com",
|
ANTHROPIC_BASE_URL: "https://api.packycode.com",
|
||||||
@@ -177,10 +177,25 @@ export const providerPresets: ProviderPreset[] = [
|
|||||||
// 请求地址候选(用于地址管理/测速)
|
// 请求地址候选(用于地址管理/测速)
|
||||||
endpointCandidates: [
|
endpointCandidates: [
|
||||||
"https://api.packycode.com",
|
"https://api.packycode.com",
|
||||||
"https://api-hk-cn2.packycode.com",
|
"https://api-slb.packycode.com",
|
||||||
"https://api-hk-g.packycode.com",
|
],
|
||||||
"https://api-us-cn2.packycode.com",
|
category: "third_party",
|
||||||
"https://api-cf-pro.packycode.com",
|
},
|
||||||
|
{
|
||||||
|
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",
|
category: "third_party",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -239,8 +239,8 @@
|
|||||||
"visitWebsite": "Visit {{url}}",
|
"visitWebsite": "Visit {{url}}",
|
||||||
"anthropicModel": "Main Model",
|
"anthropicModel": "Main Model",
|
||||||
"anthropicSmallFastModel": "Fast Model",
|
"anthropicSmallFastModel": "Fast Model",
|
||||||
"modelPlaceholder": "claude-3-7-sonnet-20250219",
|
"modelPlaceholder": "GLM-4.6",
|
||||||
"smallModelPlaceholder": "claude-3-5-haiku-20241022",
|
"smallModelPlaceholder": "GLM-4.5-Air",
|
||||||
"modelHelper": "Optional: Specify default Claude model to use, leave blank to use system default.",
|
"modelHelper": "Optional: Specify default Claude model to use, leave blank to use system default.",
|
||||||
"categoryOfficial": "Official",
|
"categoryOfficial": "Official",
|
||||||
"categoryCnOfficial": "Opensource Official",
|
"categoryCnOfficial": "Opensource Official",
|
||||||
|
|||||||
@@ -239,8 +239,8 @@
|
|||||||
"visitWebsite": "访问 {{url}}",
|
"visitWebsite": "访问 {{url}}",
|
||||||
"anthropicModel": "主模型",
|
"anthropicModel": "主模型",
|
||||||
"anthropicSmallFastModel": "快速模型",
|
"anthropicSmallFastModel": "快速模型",
|
||||||
"modelPlaceholder": "claude-3-7-sonnet-20250219",
|
"modelPlaceholder": "GLM-4.6",
|
||||||
"smallModelPlaceholder": "claude-3-5-haiku-20241022",
|
"smallModelPlaceholder": "GLM-4.5-Air",
|
||||||
"modelHelper": "可选:指定默认使用的 Claude 模型,留空则使用系统默认。",
|
"modelHelper": "可选:指定默认使用的 Claude 模型,留空则使用系统默认。",
|
||||||
"categoryOfficial": "官方",
|
"categoryOfficial": "官方",
|
||||||
"categoryCnOfficial": "开源官方",
|
"categoryCnOfficial": "开源官方",
|
||||||
|
|||||||
Reference in New Issue
Block a user