diff --git a/app/(admin)/settings/_lib/types.ts b/app/(admin)/settings/_lib/types.ts
index 5b05bb5a6..7a89fcbe5 100644
--- a/app/(admin)/settings/_lib/types.ts
+++ b/app/(admin)/settings/_lib/types.ts
@@ -89,6 +89,7 @@ export type AdminAiProvider = {
| "snapgen-image"
| "openai-image"
| "bananaimage"
+ | "visionary"
| "stepfun-image"
| "midjourney"
| "fal-video"
diff --git a/app/(admin)/settings/admin-settings-client.tsx b/app/(admin)/settings/admin-settings-client.tsx
index 4a6be57e6..d26512e1f 100644
--- a/app/(admin)/settings/admin-settings-client.tsx
+++ b/app/(admin)/settings/admin-settings-client.tsx
@@ -166,6 +166,7 @@ import { FAL_IMAGE_MODEL_PRESETS } from "@/lib/ai/fal-image-models";
import { RUXA_IMAGE_MODEL_PRESETS } from "@/lib/ai/ruxa-image-models";
import { SNAPGEN_IMAGE_MODEL_PRESETS } from "@/lib/ai/snapgen-image-models";
import { BANANAIMAGE_MODEL_PRESETS } from "@/lib/ai/bananaimage-models";
+import { VISIONARY_MODEL_PRESETS } from "@/lib/ai/visionary-models";
import {
formatImageModelCreditDiscountLabel,
getGenerationCreditCostFromImageGenConfig,
@@ -623,6 +624,7 @@ type AiProvider = {
| "snapgen-image"
| "openai-image"
| "bananaimage"
+ | "visionary"
| "stepfun-image"
| "midjourney"
| "fal-video"
@@ -1582,6 +1584,7 @@ const PROVIDER_TYPES = [
{ value: "snapgen-image", label: "SnapGen 生图" },
{ value: "openai-image", label: "OpenAI 图片兼容" },
{ value: "bananaimage", label: "BananaImage 生图" },
+ { value: "visionary", label: "Visionary 生图" },
{ value: "stepfun-image", label: "阶跃星辰 Step Image Edit" },
{ value: "bltcy-video", label: "柏拉图统一视频" },
{ value: "grsai-gpt-image", label: "Grsai GPT Image" },
@@ -1617,6 +1620,7 @@ const PROVIDER_DEFAULT_BASE_URL: Record = {
"snapgen-image": "https://api.snapgen.ai",
"openai-image": "https://api.openai.com/v1",
bananaimage: "https://bananaimage.aigenmedia.art",
+ visionary: "https://api.visionary.beer",
"stepfun-image": "https://api.stepfun.com",
"bltcy-video": "https://api.bltcy.ai",
"grsai-gpt-image": "https://grsai.dakka.com.cn",
@@ -4034,6 +4038,7 @@ export function AdminSettingsClient() {
| "snapgen-image"
| "openai-image"
| "bananaimage"
+ | "visionary"
| "stepfun-image"
| "midjourney"
| "fal-video"
@@ -6271,6 +6276,7 @@ export function AdminSettingsClient() {
const isRuxaImageProvider = providerForm.type === "ruxa-image";
const isSnapgenImageProvider = providerForm.type === "snapgen-image";
const isBananaImageProvider = providerForm.type === "bananaimage";
+ const isVisionaryProvider = providerForm.type === "visionary";
const isBltcyVideoProvider = providerForm.type === "bltcy-video";
const isLemonProvider =
providerForm.type === "openai" &&
@@ -6424,6 +6430,17 @@ export function AdminSettingsClient() {
}
}
+ if (isNewProvider && isVisionaryProvider && providerId) {
+ try {
+ await handleQuickAddVisionaryModels(providerId, { skipConfirm: true });
+ } catch (modelError) {
+ console.error("[Auto Add Visionary Models] Error:", modelError);
+ toast.warning(
+ 'Visionary 预设模型添加失败,请手动点击"快速添加 Visionary 图片预设"按钮'
+ );
+ }
+ }
+
if (isNewProvider && isBltcyVideoProvider && providerId) {
try {
await handleQuickAddBltcyVideoModels(providerId, {
@@ -7435,6 +7452,44 @@ export function AdminSettingsClient() {
}
};
+ const handleQuickAddVisionaryModels = async (
+ providerId: string,
+ options?: { skipConfirm?: boolean }
+ ) => {
+ if (
+ !options?.skipConfirm &&
+ !confirm(
+ `将同步 ${VISIONARY_MODEL_PRESETS.length} 个 Visionary 生图模型,支持最多 9 张参考图、比例选择、质量档位和 1K/2K/4K。\n\n继续吗?`
+ )
+ ) {
+ return;
+ }
+
+ try {
+ toast.info("正在同步 Visionary 生图预设模型...");
+ const response = await fetch("/api/admin/visionary-models", {
+ method: "POST",
+ headers: { "Content-Type": "application/json" },
+ body: JSON.stringify({ providerId }),
+ });
+ const data = await response.json();
+ if (!response.ok) throw new Error(data.error || "同步失败");
+
+ const totalSynced =
+ Number(data.addedCount || 0) + Number(data.updatedCount || 0);
+ if (totalSynced > 0) {
+ toast.success(`成功同步 ${totalSynced} 个 Visionary 生图预设模型`);
+ mutateModels();
+ }
+ if (data.errors?.length) {
+ toast.warning(`${data.errors.length} 个 Visionary 模型同步失败`);
+ }
+ } catch (error: any) {
+ console.error("[Quick Add Visionary Models] Error:", error);
+ toast.error(error.message || "同步 Visionary 生图预设模型失败");
+ }
+ };
+
const handleUseFalImageProviderPreset = () => {
setProviderForm({
id: "",
@@ -15643,6 +15698,14 @@ export function AdminSettingsClient() {
1K/2K/4K 输出。
)}
+ {providerForm.type === "visionary" && (
+
+ Visionary 使用 Bearer API Key 认证,默认地址
+ https://api.visionary.beer。保存后自动同步 GPT Image 2
+ 与 Nano Banana 全部开放模型,支持最多 9 张参考图、比例选择、
+ 质量档位和 1K/2K/4K 输出。
+
+ )}
{providerForm.type === "bfl-image" &&
isBltcyBflBaseUrl(providerForm.baseUrl) && (
@@ -15776,6 +15839,19 @@ export function AdminSettingsClient() {
快速添加 BananaImage 图片预设
)}
+ {provider.type === "visionary" && (
+
+ )}
{provider.type === "bltcy-video" && (