diff --git a/package.json b/package.json index 382e607..05f95df 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "scripts": { "prebuild": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\"", "build": "tsc -p tsconfig.json", - "test": "bun test/smoke.ts", + "test": "bun test/smoke.ts && bun test/models.ts", "test:haiku": "bun test/haiku-live.ts", "prepublishOnly": "npm run build" }, diff --git a/src/models.ts b/src/models.ts index 5960853..6baca34 100644 --- a/src/models.ts +++ b/src/models.ts @@ -50,6 +50,7 @@ const ALIAS_MODELS: ClaudeModel[] = [ ]; const PINNED_MODELS: ClaudeModel[] = [ + model("claude-fable-5-1", "Fable 5.1", LIMIT_1M), model("claude-opus-4-8", "Opus 4.8", LIMIT_1M), model("claude-sonnet-4-6", "Sonnet 4.6", LIMIT_1M), model("claude-haiku-4-5", "Haiku 4.5", LIMIT_200K), diff --git a/test/models.ts b/test/models.ts new file mode 100644 index 0000000..e12e1e6 --- /dev/null +++ b/test/models.ts @@ -0,0 +1,17 @@ +import assert from "node:assert/strict"; +import { getClaudeModels } from "../src/models.js"; + +const models = getClaudeModels(); + +assert.deepEqual( + models.find((model) => model.id === "claude-fable-5-1"), + { + id: "claude-fable-5-1", + name: "Fable 5.1", + reasoning: true, + contextWindow: 1_000_000, + maxTokens: 128_000, + }, +); + +console.log("ok — Claude model catalog tests passed");