2026-04-04 20:35:58 +00:00
|
|
|
import { describe, it, expect } from "vitest";
|
|
|
|
|
import {
|
|
|
|
|
CUSTOM_MODEL_OPTION,
|
|
|
|
|
CUSTOM_REST_FORMAT,
|
|
|
|
|
CUSTOM_REST_MODELS,
|
|
|
|
|
} from "@/pages/Settings/AIProviders";
|
|
|
|
|
|
|
|
|
|
describe("AIProviders Custom REST helpers", () => {
|
2026-04-07 14:46:25 +00:00
|
|
|
it("custom_rest format constant has the correct value", () => {
|
|
|
|
|
expect(CUSTOM_REST_FORMAT).toBe("custom_rest");
|
2026-04-04 20:35:58 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
it("keeps openai api_format unchanged", () => {
|
2026-04-07 14:46:25 +00:00
|
|
|
expect("openai").toBe("openai");
|
2026-04-04 20:35:58 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
it("contains the guide model list and custom model option sentinel", () => {
|
|
|
|
|
expect(CUSTOM_REST_MODELS).toContain("ChatGPT4o");
|
|
|
|
|
expect(CUSTOM_REST_MODELS).toContain("VertexGemini");
|
|
|
|
|
expect(CUSTOM_REST_MODELS).toContain("Gemini-3_Pro-Preview");
|
|
|
|
|
expect(CUSTOM_MODEL_OPTION).toBe("__custom_model__");
|
|
|
|
|
});
|
|
|
|
|
});
|