Files
pi_harness/packages/ai/test/openrouter-cache-control-models.test.ts
T
2026-07-22 11:46:21 +02:00

16 lines
550 B
TypeScript

import { describe, expect, it } from "vitest";
import { getModel } from "../src/compat.ts";
const OPENROUTER_ANTHROPIC_LATEST_MODEL_IDS = [
"~anthropic/claude-fable-latest",
"~anthropic/claude-haiku-latest",
"~anthropic/claude-opus-latest",
"~anthropic/claude-sonnet-latest",
] as const;
describe("OpenRouter Anthropic cache control metadata", () => {
it.each(OPENROUTER_ANTHROPIC_LATEST_MODEL_IDS)("enables cache control for %s", (modelId) => {
expect(getModel("openrouter", modelId).compat?.cacheControlFormat).toBe("anthropic");
});
});