Repository navigation
Open
Description
Agent
- Tool: Codex;本提案及實作為 AI-assisted / AI-generated,提交人尚未宣稱已完成人工逐行審核。
- Tool version: 桌面客戶端未向代理提供版本號。
- Model (full id): GPT-6;完整 deployment ID 未由執行環境提供。
- Host (CLI / IDE / GitHub coding agent / other): Codex Desktop,本地 Windows workspace。
- Date (UTC): 2026-09-17。
User request
「media-studio 介面改成我們本身 .162 的版本;色系/風格按 cuberouter.ai,但功能要跟 .162;考量 API/計費/log,把 test demo merge 成一套系統。」
完成本地實作後,用戶明確要求:「先 push/PR,試下同事接唔接受呢種合作模式先。」
Out of scope — refuse
- Matched: no。提案是 CubeRouter 原生 Media Studio 產品功能、帳戶媒體生命週期及既有 relay 接駁;不是使用方式提問、逆向渠道或第三方託管服務支援。
- If yes, what was told to the user: 不適用。
Kind
- Feature
- Bug
- Investigation
- Other
Usage / configuration / integration check
- https://docs.newapi.ai/:查閱官方入口的渠道、模型及 API 文件索引;現有渠道設定不能增加本提案的前端編輯器及帳戶作品歷史。
- https://deepwiki.com/QuantumNous/new-api:查閱 relay、quota/billing、logging 及 frontend 架構索引;實作仍以本 repo 程式碼為準。
- README / repo docs:README.md、docs/media-studio-integration.md、scripts/qwen_image_bridge/README.md。
- Relevant code paths:PR [feat]Media studio #96 的 web/src/features/media-studio 提供基本生圖及 browser-local history;controller/playground.go、relay/image_handler.go 提供可重用的登入與計費路徑。
- Can the current version already do this?:[feat]Media studio #96 已有基本生圖;沒有這套參考圖、局部修改、文字排版、跨瀏覽器帳戶歷史的完整 UI。
- Verdict: new feature。
Environment
- new-api version / commit / image tag:CubeRouter media-studio 分支 ac1cf56;提案分支 6c61d31。
- Deploy source:本 repo source;AI 模型由現有自建 Qwen workers 提供。
- Database:本地 SQLite;本次沒有新增 schema、migration、driver 或 ORM query。
Problem facts
- Actual behavior:基本生圖介面與既有 Qwen demo 的改圖/文字工具分開;[feat]Media studio #96 歷史在瀏覽器。
- Impact:使用者無法在同一登入帳戶下完成生圖、接續修改、保存版本和查閱對應用量。
- Frequency:每次需要圖片修改或帳戶作品歷史的流程均受此功能缺口影響;不是間歇性故障報告。
- Evidence:比較 [feat]Media studio #96 的 UI/API 與本地實測 worker 能力,缺少的是產品 UI/工作流接線,不是模型完全不支援改圖。
Type-specific details
Relay / API
- Request endpoint and method:POST /api/v1/media-studio/jobs 準備,POST /pg/images/generations/studio 經既有 relay 提交,GET 帳戶 job/asset。
- Channel type:OpenAI channel 指向私有 workflow adapter。
- Model:qwen-image-2512、qwen-image-edit-2511。
- Conversion format:經驗證的一次性 relay body;私有 adapter 轉成現有 workflow API。
- Pass-through enabled:沒有。
- Evidence of upstream native support:現有 demo 已提供 create/edit/regional/text;本地 CubeRouter 也已實跑四種操作。
- Equivalent redacted request sent directly upstream:既有 demo 路徑已在前期驗證;本 issue 不宣稱重新做了同 seed 的精確對照實驗。
- Same request through new-api:T2I、edit、regional 均 completed,存在對應 CubeRouter request ID;CPU text preview/save 亦完成。
Billing
- Request endpoint and model:上述兩個 Qwen 模型,既有 PlaygroundImage / image relay。
- Response usage:adapter 返回 image data,沿用現有 image relay 的計數及用量記錄。
- Relevant pricing:開發 DB 兩模型價格設為 0。
- Consumption log:三種 GPU 操作在預期模型/channel 產生用量記錄;文字排版只在 studio history。
- Expected charge:本地 0;正式價目、CPU/自動修正是否另收費仍待產品決定,未宣稱非零收費已驗證。
Frontend
- Page path:/media-studio。
- Browser and version:Codex 內建 Chromium;完整版本未記錄,本提案不是瀏覽器相容性故障。
- Active theme:CubeRouter 深色主題。
- Relevant Console / Network errors:開發時翻譯更新觸發 HMR 全頁 reload;重啟後正常載入。未登入 API 返回 401。
Deployment / upgrade
- Deployment method:Windows 本地 Go + React dev server,私有 Python adapter 經 SSH 連現有模型節點。
- OS and architecture:Windows 本地開發、Linux ARM64 C500 模型節點。
- Database type:SQLite。
- Versions before and after:ac1cf56a → 6c61d31。
- Startup or migration logs:無新 migration;重啟後四筆測試作品仍 completed,create/edit/tools health ready。
Reproduction and expected result
- Steps:登入、選模板生成、選結果繼續改圖、圈選局部修改、排入中英文並另存。
- Expected result:同一 CubeRouter UI 完成流程,保存原圖/新版本,按帳戶讀取媒體並對應用量日誌。
- Related screenshots:本地瀏覽器已視覺檢查;PR 文件提供操作步驟,未附永久託管的 UI 截圖。
Feature (feature requests only)
- Feature description:原生 gallery、參考圖、批量生成、編輯器、OCR 提示/文字排版、版本歷史及 authenticated assets。
- Use case:把已可工作的自建圖片 demo 變成同一個 CubeRouter 使用者流程,並讓維護者 review 接駁方式。
Duplicate check
- Search queries:repo:suanova/cuberouter "media";另查 media studio、qwen。
- Closest existing threads:[feat]Media studio #96;其餘命中 sync(upstream): 10 commits from upstream #38、Support astra #30 不屬於此功能。
- Why not duplicate:延續 [feat]Media studio #96,PR base 使用 media-studio,只呈現新增工作流,不重複提交同事的基本功能。
Research
Docs
- https://docs.newapi.ai/ :官方文件入口。
- https://deepwiki.com/QuantumNous/new-api :架構與相關章節索引。
- README / repo docs:README.md 和上述兩份新 runbook。
- Conclusions:重用 CubeRouter 的登入、channel、quota 及 Usage Logs;媒體工作流是新增能力。
Code
- web/src/features/media-studio — 原生 UI 與基本模式 fallback。
- controller/media_studio.go、service/media_studio.go — owner-scoped proxy、一次性授權及 relay 完成回報。
- scripts/qwen_image_bridge — 帳戶檔案、任務及 worker 接駁。
- controller/playground.go、relay/image_handler.go — 原有計費及記錄流程。
Experiments
- Command:Python 23 tests;Go TestStudio;web typecheck、Media Studio 65 tests、production build。
- Direct upstream result:現有 worker 支援相關工作流;未做新的逐像素直接/relay 對照 benchmark。
- Result through new-api:四種操作完成;區域修改變動像素在選區內;重啟保留歷史;未登入 401。
- Conclusion:開發版接線已可用,正式上線條件另列。
Working theory
- Missing:從基本生圖走到可反覆修改、保存及管理媒體的產品工作流。
- Why:原 demo 与 CubeRouter 有獨立 UI、儲存及任務管理。
- What would falsify this:維護者已有另一套滿足同樣帳戶/編輯/計費契約的實作,則應整併。
Scope
- In scope:原生 Media Studio 工作流與私有 worker 接口。
- Out of scope:模型訓練、web search、影片、正式分散式媒體平台。
- Large or directional feature:是,維護者尚未同意方案。用戶明確要求先提交 Draft PR 作協作討論;不宣稱已有方向共識或可直接上線。
Proposed direction
請先 review UI 流程、API 邊界、reuse relay 的做法及部署依賴。接受方向後,可按 frontend / worker / production storage 等界線拆分後續修改。未設定 worker 時,保留 #96 原本 basic UI。
Not verified
非零正式收費、MySQL/PostgreSQL 實例、分散式恢復、併發容量、全套端到端刪除。帳戶副本有 TTL;原始 GPU 檔案/舊公開 demo 存取、共用 object storage、持久化結算補償尚須完善。
Related
Metadata
Metadata
Assignees
Labels
No labels
Activity
Porting all since 09‑21 (#110)