mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
This builds the model catalog from per-provider definitions and models.dev v2 data. It eplacer `generate-models.ts` with one `defineProvider()` file per built-in provider, shared model-family rules (Claude, GPT, DeepSeek, Kimi, Google), and source adapters. models.dev is read through its v2 API. Outputs and CLI flags are unchanged.
36 lines
1.1 KiB
TypeScript
36 lines
1.1 KiB
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { getEffortThinkingLevelMap } from "../catalog/reasoning.ts";
|
|
|
|
describe("getEffortThinkingLevelMap", () => {
|
|
it("exposes only verified effort values and none", () => {
|
|
expect(
|
|
getEffortThinkingLevelMap([{ type: "toggle" }, { type: "effort", values: ["none", "low", "high", "max"] }]),
|
|
).toEqual({
|
|
off: "none",
|
|
minimal: null,
|
|
low: "low",
|
|
medium: null,
|
|
high: "high",
|
|
xhigh: null,
|
|
max: "max",
|
|
});
|
|
});
|
|
|
|
it("does not infer thinking-off from an effort list", () => {
|
|
expect(getEffortThinkingLevelMap([{ type: "effort", values: ["low", "high", "max"] }])).toEqual({
|
|
off: null,
|
|
minimal: null,
|
|
low: "low",
|
|
medium: null,
|
|
high: "high",
|
|
xhigh: null,
|
|
max: "max",
|
|
});
|
|
});
|
|
|
|
it("leaves toggle and budget controls for their adapter-specific implementations", () => {
|
|
expect(getEffortThinkingLevelMap([{ type: "toggle" }])).toBeUndefined();
|
|
expect(getEffortThinkingLevelMap([{ type: "budget_tokens", min: 1024, max: 32000 }])).toBeUndefined();
|
|
expect(getEffortThinkingLevelMap([{ type: "effort", values: [null, "default"] }])).toBeUndefined();
|
|
});
|
|
});
|