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> {
|
||||
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",
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
@@ -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",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user