diff --git a/docs/lan-mode.md b/docs/lan-mode.md index 7bb1990..de19cc0 100644 --- a/docs/lan-mode.md +++ b/docs/lan-mode.md @@ -247,6 +247,7 @@ OCP Connect v1.3.0 Provider: ocp Models: • ocp/claude-opus-5 + • ocp/claude-opus-4-8 • ocp/claude-opus-4-7 • ocp/claude-opus-4-6 • ocp/claude-sonnet-5 diff --git a/test-features.mjs b/test-features.mjs index a3a55bc..7ccf82b 100644 --- a/test-features.mjs +++ b/test-features.mjs @@ -4089,15 +4089,18 @@ test("models.json: claude-opus-5 is present in models[] (the entry this PR adds) }); // The prompt-char budget is GLOBAL (max across every entry × 3 chars/token), not -// per-model — see lib/prompt.mjs derivePromptCharBudget. A future entry declaring a -// native 1M window would therefore raise the truncation ceiling for claude-haiku-4-5 -// too (genuinely 200k), turning OCP-side truncation into an upstream API rejection. -// Adding one is a deliberate ADR-level change; this pins the current invariant. -test("models.json: every contextWindow is 200000 (global prompt-budget invariant)", () => { - for (const m of _spotModels.models) { - assert.equal(m.contextWindow, 200000, - `${m.id} declares contextWindow=${m.contextWindow}; a non-200k entry re-scales MAX_PROMPT_CHARS for ALL models (see lib/prompt.mjs)`); - } +// per-model — see lib/prompt.mjs derivePromptCharBudget. An entry declaring a native 1M +// window would therefore raise the truncation ceiling for claude-haiku-4-5 too (genuinely +// 200k), turning OCP-side truncation into an upstream API rejection. +// +// Asserts the MAX, deliberately, not every entry: ADR 0009 states the budget "scales +// automatically — no code change", so a future entry with a SMALLER window (say a 128k +// model) must stay legal and must not fail this suite. Only raising the ceiling is the +// hazard, and that is an ADR-level decision requiring per-model budgets first. +test("models.json: max contextWindow is 200000 (global prompt-budget ceiling)", () => { + const windows = _spotModels.models.map(m => m.contextWindow); + assert.equal(Math.max(...windows), 200000, + `max contextWindow re-scales MAX_PROMPT_CHARS for ALL models incl. the 200k-native haiku (see lib/prompt.mjs + ADR 0009)`); }); test("models.json: every aliases value resolves to a real models[].id (referential integrity)", () => {