docs: 清理 OpenAI 时代残留,文档改述 vivid 协议 + 渠道架构
- README/README.en 重写:同构网关 + vivid 四端点 + 渠道同步/调度, 明确不支持 OpenAI 协议上游;移除账号池/七大平台/OpenAI 兼容描述 - backend/frontend README、.env.example 更新(补 RUSTFS/COOKIE_SECURE/ CHANNEL_SECRET) - docker-compose 增加 CHANNEL_SECRET(渠道 key AES-GCM 密钥) - 清掉代码注释/文档示例里的 OpenAI/gpt-image-2 残留 Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
+8
-24
@@ -1,7 +1,8 @@
|
||||
# ai-gateway frontend
|
||||
# image2api frontend
|
||||
|
||||
Vue 3 + Vite admin console for the ai-gateway backend. This replaces the old
|
||||
single-file `static/admin.html`.
|
||||
Vue 3 + Vite frontend for `image2api`: user-facing generation UI (playground,
|
||||
gallery, docs, billing) plus the admin console (channels, models, users,
|
||||
orders, logs, config).
|
||||
|
||||
## Develop
|
||||
|
||||
@@ -10,27 +11,10 @@ npm install
|
||||
npm run dev # http://localhost:5173
|
||||
```
|
||||
|
||||
The dev server proxies `/admin`, `/health`, `/generated`, `/v1` to the backend.
|
||||
Start the backend separately:
|
||||
The dev server proxies `/admin`, `/health`, `/images`, `/v1` to the backend.
|
||||
Start the Go backend separately (see `backend/README.md`).
|
||||
|
||||
```bash
|
||||
# from repo root
|
||||
python app.py # http://0.0.0.0:6060
|
||||
# from ../backend
|
||||
go build -o bin/api ./cmd/api && ./bin/api # http://127.0.0.1:6666
|
||||
```
|
||||
|
||||
If the backend runs elsewhere, set `VITE_BACKEND` before `npm run dev`:
|
||||
|
||||
```bash
|
||||
VITE_BACKEND=http://192.168.1.10:6060 npm run dev
|
||||
```
|
||||
|
||||
## Build
|
||||
|
||||
```bash
|
||||
npm run build # outputs static assets to ./dist
|
||||
npm run preview # serve the production build locally
|
||||
```
|
||||
|
||||
When hosting `dist/` on a different origin than the API, set `VITE_API_BASE`
|
||||
(e.g. `VITE_API_BASE=http://api-host:6060`) at build time, and add that frontend
|
||||
origin to the backend's `CORS_ORIGINS` env var.
|
||||
|
||||
@@ -30,7 +30,7 @@ const videoModels = computed(() => models.value.filter((m) => m.type === 'video'
|
||||
function pubName(m) {
|
||||
return m?.alias || m?.id || ''
|
||||
}
|
||||
const sampleImage = computed(() => pubName(imageModels.value[0]) || 'gpt-image-2')
|
||||
const sampleImage = computed(() => pubName(imageModels.value[0]) || 'image-model')
|
||||
const sampleVideo = computed(() => pubName(videoModels.value[0]) || 'video-model')
|
||||
const sampleQuality = computed(() => (imageModels.value[0]?.resolutions || [])[0] || '1K')
|
||||
const sampleVQuality = computed(() => (videoModels.value[0]?.resolutions || [])[0] || '720p')
|
||||
|
||||
@@ -116,9 +116,8 @@ const maxRefs = computed(() => {
|
||||
const extra = familyPreset.value ? 0 : maxVideos.value + maxAudios.value
|
||||
return Math.max(a, b) + extra
|
||||
}
|
||||
// Image-to-image: honor the model's configured max (gpt-image-2=3,
|
||||
// seedream-4.5=6, flux-klein-2=4 …). Fall back to 1 when image_to_image is on
|
||||
// but no count was set.
|
||||
// Image-to-image: honor the model's configured max (e.g. 3 or 6 refs, set per
|
||||
// model). Fall back to 1 when image_to_image is on but no count was set.
|
||||
const m = Number(model.value?.max_reference_images || 0)
|
||||
if (m > 0) return m
|
||||
return model.value?.image_to_image ? 1 : 0
|
||||
|
||||
@@ -26,7 +26,7 @@ onMounted(async () => {
|
||||
}
|
||||
})
|
||||
|
||||
// ---- API Key (REAL: minted + verified server-side; OpenAI-compatible) ----
|
||||
// ---- API Key (REAL: minted + verified server-side; vivid /v1 protocol) ----
|
||||
// The full plaintext is returned only once, right after minting. On reload we
|
||||
// only have the server's masked preview (the plaintext is never stored).
|
||||
const apiKey = ref('') // full plaintext — present only right after minting
|
||||
|
||||
Reference in New Issue
Block a user