fix: ComfyUI Agent uses upstream API via env vars

- Read BOOSAPI_UPSTREAM_BASE/BOOSAPI_UPSTREAM_KEY from env
- Default to api.boos.lat/v1 with sk-boos4721
- Document: internal tool bypasses proxy /v1/ routing layer
- Update AGENTS.md with architecture decision
This commit is contained in:
boos
2026-05-17 04:23:20 +08:00
parent 5e3d4ee7d4
commit 2fe8d8528a
2 changed files with 7 additions and 2 deletions
+4 -2
View File
@@ -1,8 +1,10 @@
import { FastifyInstance } from 'fastify';
import { fetch } from 'undici';
const UPSTREAM_BASE = 'https://api.boos.lat/v1';
const UPSTREAM_KEY = 'sk-boos4721';
// 使用 BoosAPI 本地配置的上游 API(不走代理 /v1/ 路由,因为内部工具无需路由+下游密钥认证)
// 可通过环境变量覆盖: BOOSAPI_UPSTREAM_BASE, BOOSAPI_UPSTREAM_KEY
const UPSTREAM_BASE = process.env.BOOSAPI_UPSTREAM_BASE || 'https://api.boos.lat/v1';
const UPSTREAM_KEY = process.env.BOOSAPI_UPSTREAM_KEY || 'sk-boos4721';
const SYSTEM_PROMPT = `你是 BoosAPI 的 AI 视频生成助手,帮助用户通过 ComfyUI 制作 AI 视频。