fix(ai): keep dedicated 3d provider frontend route
This commit is contained in:
parent
e2f8a253a7
commit
712d4350a0
@ -650,7 +650,8 @@ function createThreeDPreset(
|
|||||||
type: "model_3d",
|
type: "model_3d",
|
||||||
supportsVision: supportsImageInput,
|
supportsVision: supportsImageInput,
|
||||||
supportsImageGen: false,
|
supportsImageGen: false,
|
||||||
isHidden: false,
|
// Keep the dedicated Tripo 3D integration as the only frontend 3D route.
|
||||||
|
isHidden: true,
|
||||||
capabilities: {
|
capabilities: {
|
||||||
provider: "vip98k",
|
provider: "vip98k",
|
||||||
kind: "model-3d",
|
kind: "model-3d",
|
||||||
|
|||||||
@ -454,9 +454,9 @@ async function main() {
|
|||||||
const capabilities = model.capabilities as Record<string, unknown>;
|
const capabilities = model.capabilities as Record<string, unknown>;
|
||||||
const kind = String(capabilities?.kind || "").trim().toLowerCase();
|
const kind = String(capabilities?.kind || "").trim().toLowerCase();
|
||||||
if (["video", "model-3d", "world", "chat"].includes(kind)) {
|
if (["video", "model-3d", "world", "chat"].includes(kind)) {
|
||||||
return model.supportsImageGen;
|
if (model.supportsImageGen) return true;
|
||||||
}
|
}
|
||||||
return kind === "image-tool" && !model.isHidden;
|
return ["image-tool", "model-3d"].includes(kind) && !model.isHidden;
|
||||||
});
|
});
|
||||||
if (invalidVipModels.length > 0) {
|
if (invalidVipModels.length > 0) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
|
|||||||
@ -223,6 +223,12 @@ test.describe("AI model media classification", () => {
|
|||||||
capabilities: ["multimodal"],
|
capabilities: ["multimodal"],
|
||||||
inputModes: ["text", "image"],
|
inputModes: ["text", "image"],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
modelId: "tencent/hunyuan3d-pro/text-to-3d",
|
||||||
|
displayName: "Hunyuan 3D",
|
||||||
|
type: "image",
|
||||||
|
capabilities: ["text-to-3d"],
|
||||||
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
expect(presets.find((item) => item.modelId === "mislabelled-video")).toMatchObject({
|
expect(presets.find((item) => item.modelId === "mislabelled-video")).toMatchObject({
|
||||||
@ -247,6 +253,14 @@ test.describe("AI model media classification", () => {
|
|||||||
supportsVision: true,
|
supportsVision: true,
|
||||||
supportsImageGen: false,
|
supportsImageGen: false,
|
||||||
});
|
});
|
||||||
|
expect(
|
||||||
|
presets.find((item) => item.modelId === "tencent/hunyuan3d-pro/text-to-3d"),
|
||||||
|
).toMatchObject({
|
||||||
|
type: "model_3d",
|
||||||
|
supportsImageGen: false,
|
||||||
|
isHidden: true,
|
||||||
|
capabilities: { kind: "model-3d" },
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test("only shows VIP98K image models verified as released in 2026 or later", () => {
|
test("only shows VIP98K image models verified as released in 2026 or later", () => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user