- 新增 auth-middleware.js 验证客户端 API Key - 支持 Authorization: Bearer <key> 和 x-api-key 两种方式 - API Keys 只通过环境变量配置(安全最佳实践) - 公开路径: /, /health, /status - 可配置 /v1/models 是否需要认证 - 启动时输出认证状态日志 配置方式: AUTH_ENABLED=true API_KEYS=sk-key1,sk-key2 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
110 lines
2.4 KiB
JSON
110 lines
2.4 KiB
JSON
{
|
|
"port": 3000,
|
|
"model_redirects": {
|
|
"claude-3-5-haiku-20241022": "claude-haiku-4-5-20251001",
|
|
"claude-sonnet-4-5": "claude-sonnet-4-5-20250929"
|
|
},
|
|
"endpoint": [
|
|
{
|
|
"name": "openai",
|
|
"base_url": "https://api.factory.ai/api/llm/o/v1/responses"
|
|
},
|
|
{
|
|
"name": "anthropic",
|
|
"base_url": "https://api.factory.ai/api/llm/a/v1/messages"
|
|
},
|
|
{
|
|
"name": "common",
|
|
"base_url": "https://api.factory.ai/api/llm/o/v1/chat/completions"
|
|
}
|
|
],
|
|
"proxies": [],
|
|
"models": [
|
|
{
|
|
"name": "Opus 4.5",
|
|
"id": "claude-opus-4-5-20251101",
|
|
"type": "anthropic",
|
|
"reasoning": "auto",
|
|
"provider": "anthropic"
|
|
},
|
|
{
|
|
"name": "Haiku 4.5",
|
|
"id": "claude-haiku-4-5-20251001",
|
|
"type": "anthropic",
|
|
"reasoning": "auto",
|
|
"provider": "anthropic"
|
|
},
|
|
{
|
|
"name": "Sonnet 4.5",
|
|
"id": "claude-sonnet-4-5-20250929",
|
|
"type": "anthropic",
|
|
"reasoning": "auto",
|
|
"provider": "anthropic"
|
|
},
|
|
{
|
|
"name": "GPT-5.2",
|
|
"id": "gpt-5.2",
|
|
"type": "openai",
|
|
"reasoning": "auto",
|
|
"provider": "openai"
|
|
},
|
|
{
|
|
"name": "GPT-5.1",
|
|
"id": "gpt-5.1",
|
|
"type": "openai",
|
|
"reasoning": "auto",
|
|
"provider": "openai"
|
|
},
|
|
{
|
|
"name": "GPT-5.1 Codex",
|
|
"id": "gpt-5.1-codex",
|
|
"type": "openai",
|
|
"reasoning": "off",
|
|
"provider": "openai"
|
|
},
|
|
{
|
|
"name": "GPT-5.1 Codex Max",
|
|
"id": "gpt-5.1-codex-max",
|
|
"type": "openai",
|
|
"reasoning": "auto",
|
|
"provider": "openai"
|
|
},
|
|
{
|
|
"name": "GLM-4.6",
|
|
"id": "glm-4.6",
|
|
"type": "common",
|
|
"reasoning": "off",
|
|
"provider": "fireworks"
|
|
},
|
|
{
|
|
"name": "Gemini-3-Pro",
|
|
"id": "gemini-3-pro-preview",
|
|
"type": "common",
|
|
"reasoning": "auto",
|
|
"provider": "google"
|
|
},
|
|
{
|
|
"name": "Gemini-3-Flash",
|
|
"id": "gemini-3-flash-preview",
|
|
"type": "common",
|
|
"reasoning": "auto",
|
|
"provider": "google"
|
|
}
|
|
],
|
|
"cors": {
|
|
"enabled": true,
|
|
"allow_all": false,
|
|
"origins": [
|
|
"http://localhost:3000",
|
|
"http://localhost:5173",
|
|
"http://127.0.0.1:3000"
|
|
]
|
|
},
|
|
"auth": {
|
|
"enabled": false,
|
|
"public_models": true
|
|
},
|
|
"dev_mode": false,
|
|
"user_agent": "factory-cli/0.40.2",
|
|
"system_prompt": "You are Droid, an AI software engineering agent built by Factory.\n\n"
|
|
} |