mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
750d97e8ad
In reference to [Issue 548](https://github.com/openai/codex/issues/548) - part 1.
20 lines
715 B
TypeScript
20 lines
715 B
TypeScript
import { describe, expect, test } from "vitest";
|
|
import { openAiModelInfo } from "../src/utils/model-info";
|
|
|
|
describe("Model Info", () => {
|
|
test("supportedModelInfo contains expected models", () => {
|
|
expect(openAiModelInfo).toHaveProperty("gpt-4o");
|
|
expect(openAiModelInfo).toHaveProperty("gpt-4.1");
|
|
expect(openAiModelInfo).toHaveProperty("o3");
|
|
});
|
|
|
|
test("model info entries have required properties", () => {
|
|
Object.entries(openAiModelInfo).forEach(([_, info]) => {
|
|
expect(info).toHaveProperty("label");
|
|
expect(info).toHaveProperty("maxContextLength");
|
|
expect(typeof info.label).toBe("string");
|
|
expect(typeof info.maxContextLength).toBe("number");
|
|
});
|
|
});
|
|
});
|