Rename custom API format handling from custom_rest to custom_rest with backward compatibility, add guided model selection with custom entry in provider settings, and rebrand app naming to Troubleshooting and RCA Assistant across UI, metadata, and docs. Made-with: Cursor
26 lines
845 B
TypeScript
26 lines
845 B
TypeScript
import { describe, it, expect } from "vitest";
|
|
import {
|
|
CUSTOM_MODEL_OPTION,
|
|
CUSTOM_REST_FORMAT,
|
|
CUSTOM_REST_MODELS,
|
|
LEGACY_API_FORMAT,
|
|
normalizeApiFormat,
|
|
} from "@/pages/Settings/AIProviders";
|
|
|
|
describe("AIProviders Custom REST helpers", () => {
|
|
it("maps legacy msi_genai api_format to custom_rest", () => {
|
|
expect(normalizeApiFormat(LEGACY_API_FORMAT)).toBe(CUSTOM_REST_FORMAT);
|
|
});
|
|
|
|
it("keeps openai api_format unchanged", () => {
|
|
expect(normalizeApiFormat("openai")).toBe("openai");
|
|
});
|
|
|
|
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__");
|
|
});
|
|
});
|