Test isCacheTtlEligibleProvider for DeepInfra

This commit is contained in:
Georgi Atsev 2026-03-16 12:57:33 +02:00
parent c4401fe867
commit d16c10b078

View File

@ -29,6 +29,8 @@ describe("isCacheTtlEligibleProvider", () => {
it("allows moonshot and zai providers", () => {
expect(isCacheTtlEligibleProvider("moonshot", "kimi-k2.5")).toBe(true);
expect(isCacheTtlEligibleProvider("zai", "glm-5")).toBe(true);
expect(isCacheTtlEligibleProvider("deepinfra", "zai-org/glm-5")).toBe(true);
expect(isCacheTtlEligibleProvider("deepinfra", "moonshotai/kimi-k2.5")).toBe(true);
});
it("is case-insensitive for native providers", () => {
@ -46,5 +48,6 @@ describe("isCacheTtlEligibleProvider", () => {
it("rejects unsupported providers and models", () => {
expect(isCacheTtlEligibleProvider("openai", "gpt-4o")).toBe(false);
expect(isCacheTtlEligibleProvider("openrouter", "openai/gpt-4o")).toBe(false);
expect(isCacheTtlEligibleProvider("deepinfra", "openai/gpt-4o")).toBe(false);
});
});