2025-08-30 22:08:41 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* Codex 预设供应商配置模板
|
|
|
|
|
|
*/
|
2025-09-11 22:33:55 +08:00
|
|
|
|
import { ProviderCategory } from "../types";
|
|
|
|
|
|
|
2025-08-30 22:08:41 +08:00
|
|
|
|
export interface CodexProviderPreset {
|
|
|
|
|
|
name: string;
|
|
|
|
|
|
websiteUrl: string;
|
|
|
|
|
|
auth: Record<string, any>; // 将写入 ~/.codex/auth.json
|
|
|
|
|
|
config: string; // 将写入 ~/.codex/config.toml(TOML 字符串)
|
|
|
|
|
|
isOfficial?: boolean; // 标识是否为官方预设
|
2025-09-11 22:33:55 +08:00
|
|
|
|
category?: ProviderCategory; // 新增:分类
|
2025-08-30 22:08:41 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export const codexProviderPresets: CodexProviderPreset[] = [
|
|
|
|
|
|
{
|
|
|
|
|
|
name: "Codex官方",
|
2025-08-30 23:02:49 +08:00
|
|
|
|
websiteUrl: "https://chatgpt.com/codex",
|
2025-08-30 22:08:41 +08:00
|
|
|
|
isOfficial: true,
|
2025-09-11 22:33:55 +08:00
|
|
|
|
category: "official",
|
2025-08-30 23:02:49 +08:00
|
|
|
|
// 官方的 key 为null
|
|
|
|
|
|
auth: {
|
2025-08-31 18:14:31 +08:00
|
|
|
|
OPENAI_API_KEY: null,
|
2025-08-30 23:02:49 +08:00
|
|
|
|
},
|
|
|
|
|
|
config: ``,
|
2025-08-30 22:08:41 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
name: "PackyCode",
|
2025-08-30 23:02:49 +08:00
|
|
|
|
websiteUrl: "https://codex.packycode.com/",
|
2025-09-11 22:33:55 +08:00
|
|
|
|
category: "third_party",
|
2025-08-30 22:08:41 +08:00
|
|
|
|
// PackyCode 一般通过 API Key;请将占位符替换为你的实际 key
|
|
|
|
|
|
auth: {
|
2025-08-31 18:14:31 +08:00
|
|
|
|
OPENAI_API_KEY: "sk-your-api-key-here",
|
2025-08-30 22:08:41 +08:00
|
|
|
|
},
|
2025-08-30 23:02:49 +08:00
|
|
|
|
config: `model_provider = "packycode"
|
|
|
|
|
|
model = "gpt-5"
|
|
|
|
|
|
model_reasoning_effort = "high"
|
2025-09-03 16:33:12 +08:00
|
|
|
|
disable_response_storage = true
|
2025-09-19 16:00:31 +08:00
|
|
|
|
requires_openai_auth = true
|
|
|
|
|
|
|
2025-08-30 23:02:49 +08:00
|
|
|
|
|
|
|
|
|
|
[model_providers.packycode]
|
|
|
|
|
|
name = "packycode"
|
|
|
|
|
|
base_url = "https://codex-api.packycode.com/v1"
|
|
|
|
|
|
wire_api = "responses"
|
|
|
|
|
|
env_key = "packycode"`,
|
2025-08-30 22:08:41 +08:00
|
|
|
|
},
|
|
|
|
|
|
];
|