Commit Graph
13 Commits
Author SHA1 Message Date
kicer e378ad001f video-gen: add /upload endpoint for local image upload
Adds POST /upload (multer diskStorage, max 8MB, image/* only) returning
a public URL under /uploads/* that can be passed directly to
generate_video.image_url. Uploads live in container temp storage and
are discarded on restart (no persistence, no auth).

generate_video tool description is now built at startup with the real
upload URL baked in (resolved from PUBLIC_BASE_URL env, falls back to
http://localhost:<port>) so the AI sees an exact curl command and
doesn't have to guess the host.

docker-compose: set PUBLIC_BASE_URL=https://video-gen.ai.foresh.com
README: new upload section, reverse-proxy note, FAQ entries
2026-09-04 20:58:51 +08:00
kicer 710200605b add video-gen support 2026-09-04 16:19:34 +08:00
kicer 44da1dcf08 翻译成简单英语方便AI理解 2026-09-04 13:04:25 +08:00
kicer c1eac96db1 i18n(image-gen): translate remaining AI-facing response text to English
Translate the four remaining content.text strings in the tool callback:
- 'no URL returned' error
- success summary (Model / Prompt / Image N)
- generation failure error
- error detail label

Style follows the short-sentence convention from baa04d9 (no extra
explanatory notes added).
2026-09-04 12:55:42 +08:00
kicer bc53ff3129 i18n(image-gen): translate tool description & token-error text to English
Translate the four strings introduced in baa04d9 (\u8c03\u6574\u90e8\u5206\u63d0\u793a\u8bcd) to clear English.
Other Chinese strings in this file (success summary, image-N labels, failure detail)
were not changed in that commit and are intentionally left untouched here.
2026-09-04 12:54:33 +08:00
kicer 2455778f4a Revert "i18n(image-gen): translate AI-facing tool response text to English"
This reverts commit 06a9ae7151d47e0486abad1f11353164db377d45.
2026-09-04 12:54:00 +08:00
kicer a29ffd9aa5 i18n(image-gen): translate AI-facing tool response text to English
The tool result content is consumed by AI agents (Claude/Cursor/...).
Converted four user-facing strings to clear English:

- Missing-token error message
- No-URL-in-response error message
- Success summary (added expiry note for AI to act on)
- Generation-failure error message

Code comments and tool description/describes are untouched in this commit.
2026-09-04 12:52:10 +08:00
kicer 594650510b 调整部分提示词 2026-09-04 12:50:30 +08:00
kicer eba3a3c7ff fix(image-gen): 从 extra.requestInfo.headers 读取 token & model(修正字段路径)
之前 pickToken/pickModel 用的 'extra?.requestInfo?.req?.headers' 多写了一层 '.req',
SDK 实际只有 extra.requestInfo.headers(参见 webStandardStreamableHttp.js buildRequestInfo),
导致 token/model 始终为 null,AI 调用时实际走默认 model 且若未额外修过 token 则报 401。

本提交:
- 取 header 改用 extra.requestInfo.headers
- pickToken/pickModel 签名改为接收 headers 对象(去掉对 req 的依赖)
- Model 仍只在 tools/call 阶段从 header 读取,不存 session
- Model 优先级:header > DEFAULT_MODEL(已删 schema 里的 model 字段,AI 无法误传)
- README 同步更新鉴权与 model 章节
2026-09-04 12:43:23 +08:00
kicer 76aa1aa604 feat(image-gen): 移除 header 传 model 的逻辑,仅保留工具参数 → 兜底默认
- 删除 extractModelFromHeaders / X-Image-Gen-Model 等 header 解析路径
- model 优先级简化为单链:arguments.model → DEFAULT_MODEL (CogView-3-Flash)
- 新增 README.md,覆盖启动、客户端配置、工具用法、curl 调试、FAQ
2026-09-04 12:08:54 +08:00
kicer f7b4e17cfe add model参数 2026-09-04 11:17:46 +08:00
kicer b2c683d455 add image-gen server 2026-09-04 11:13:03 +08:00
kicer e387293f00 init mcp server 2026-09-04 11:11:32 +08:00