mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
* docs(ai,coding-agent): generate models.json reference from schemas Add npm run generate:references, which renders docs/models-configuration.md from the models.json TypeBox schemas, and describe provider and model fields in those schemas. Overrides get their own descriptions without defaults, and compat sections cover the Responses API aliases. closes #10790 * Modify changelog * docs(ai,coding-agent): use shared thinkingLevelMap and promptCache schemas Replace the per-use schema helpers with fixed schemas whose descriptions hold for both models and modelOverrides entries.
17 lines
680 B
TypeScript
17 lines
680 B
TypeScript
import { readFileSync } from "node:fs";
|
|
import { describe, expect, it } from "vitest";
|
|
import { renderReferences } from "../scripts/generate-references.ts";
|
|
|
|
describe("generated reference pages", () => {
|
|
// Regression for #10790: models.json fields lost their reference documentation.
|
|
it("matches the committed pages", () => {
|
|
const rendered = renderReferences();
|
|
expect([...rendered.keys()]).toEqual(["docs/models-configuration.md"]);
|
|
for (const [relativePath, expected] of rendered) {
|
|
expect(
|
|
readFileSync(new URL(`../${relativePath}`, import.meta.url), "utf-8"),
|
|
`${relativePath} is stale; run npm run generate:references`,
|
|
).toBe(expected);
|
|
}
|
|
});
|
|
});
|