Fix model test routing for image providers

This commit is contained in:
yicone
2026-06-02 21:14:36 +08:00
parent cce8a50cac
commit e414975d0c
7 changed files with 309 additions and 163 deletions
+12
View File
@@ -0,0 +1,12 @@
import { describe, it, expect } from "vitest";
import { parseModel } from "../../open-sse/services/model.js";
describe("HuggingFace model alias parsing", () => {
it("resolves hf alias to huggingface provider", () => {
expect(parseModel("hf/black-forest-labs/FLUX.1-schnell")).toMatchObject({
provider: "huggingface",
model: "black-forest-labs/FLUX.1-schnell",
providerAlias: "hf",
});
});
});