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:
@@ -1,5 +1,8 @@
|
|||||||
# Metapi Engineering Rules
|
# Metapi Engineering Rules
|
||||||
|
|
||||||
|
> **AI开发**: 除非用户明确要求切换,BoosAPI 项目全程使用 **gpt-5.5**(`api.boos.lat/v1`,key: `sk-boos4721`)进行开发工作。
|
||||||
|
ComfyUI Agent 后端直连上游 API(从 `BOOSAPI_UPSTREAM_BASE`/`BOOSAPI_UPSTREAM_KEY` env 读取),不走本地代理 `/v1/` 路由,因为内部工具无需代理路由+下游密钥认证。
|
||||||
|
|
||||||
These rules apply to the whole repository unless a deeper `AGENTS.md` overrides
|
These rules apply to the whole repository unless a deeper `AGENTS.md` overrides
|
||||||
them. They are intentionally opinionated and mechanical so humans and agents can
|
them. They are intentionally opinionated and mechanical so humans and agents can
|
||||||
make small, consistent changes without re-learning the codebase each time.
|
make small, consistent changes without re-learning the codebase each time.
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
import { FastifyInstance } from 'fastify';
|
import { FastifyInstance } from 'fastify';
|
||||||
import { fetch } from 'undici';
|
import { fetch } from 'undici';
|
||||||
|
|
||||||
const UPSTREAM_BASE = 'https://api.boos.lat/v1';
|
// 使用 BoosAPI 本地配置的上游 API(不走代理 /v1/ 路由,因为内部工具无需路由+下游密钥认证)
|
||||||
const UPSTREAM_KEY = 'sk-boos4721';
|
// 可通过环境变量覆盖: 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 视频。
|
const SYSTEM_PROMPT = `你是 BoosAPI 的 AI 视频生成助手,帮助用户通过 ComfyUI 制作 AI 视频。
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user