/** * Anthropic model-family rules — which Claude models refuse which * request parameters — shared by every caller that builds an Anthropic * request: the generation harness's router (`@ggui-ai/ui-gen`), the * negotiator's structured call (`@ggui-ai/mcp-server`), and the * negotiator/probe tooling. One module instead of a copy per caller: * a model the API starts refusing a parameter for is added here once. * The families are regexes — a second list of models beside the * registry. The forced-tool one stays a regex and is PINNED instead * (ggui#1268): a table written from the vendor's pages classifies every * Anthropic id the allowlists in `llm-route.ts` can route, and the * predicate must agree with it in both directions — so a routable id * added without a vendor-quoted row, or a disagreement, fails CI. * * Lives in protocol beside `llm-route.ts` because model facts live * here: the registry rows (`llm.ts`), the allowlists and the * Bedrock/OpenRouter shape validators (`llm-route.ts`). Pure string * predicates; no SDK, no I/O. * * **The model lists GROW, and that is the contract.** Each predicate * answers "does Anthropic refuse this parameter on this model?", and * Anthropic adds models that refuse things. A predicate starting to * return `true` for a model id it returned `false` for (a newly listed * model, or a newly recognised spelling of one) is an ADDITIVE change * under VERSION-POLICY, not a breaking one: callers already handle both * answers for every id. What is frozen is the signatures (`string` in, * `boolean`/`string` out) and the direction of each answer. Never * snapshot a predicate's output as a fixed list. * * The two directions are not equally safe. Widening (`true` for more * ids) is the SAFE direction: a wrong `true` degrades to the permissive * request (sampling params omitted, `tool_choice: auto`). Narrowing * (`true` → `false`) is the UNSAFE direction: a wrong `false` sends a * parameter the API rejects with a 400 — so a narrowing needs the * vendor's page quoted on the issue, not only a test. For * `normalizeAnthropicModelId`, which returns a string, the matching * rule is that a newly recognised spelling maps to the SAME bare id, * never a different one. */ /** * Strip every routing spelling down to the bare Claude API id so the * family predicates below see one form: `anthropic/claude-x`, * `anthropic.claude-x`, `.anthropic.claude-x[-vN:M]` for every * Bedrock cross-region profile in `BEDROCK_INFERENCE_REGION_PREFIXES` * (ggui#1254 — the old two-letter match let `global.` and `apac.` through, * so a `global.anthropic.claude-opus-5-5` route sent a forced tool choice * and kept its sampling params), a `bedrock/` prefix, and the bare * `claude-x` all normalize to `claude-x…`. OpenRouter's dotted versions * (`anthropic/claude-opus-5.5`) keep their dot; the predicates accept * both. ARNs are left as-is (they name a profile, not a family) and match * no predicate. */ export declare function normalizeAnthropicModelId(model: string): string; /** * Models that reject non-default sampling parameters with HTTP 400: * Opus 4.7 and everything after it (Fable 5, Fable 5.1, Opus 5, * Sonnet 5). Haiku 4.5 (`claude-haiku-4-5*`) still accepts them. * Strings per ggui#706 (platform.claude.com, verified 2026-09-02). */ export declare function anthropicRejectsSamplingParams(model: string): boolean; /** * Models that reject a FORCED tool choice (`tool_choice: any` / a named * tool) with HTTP 400. The API reference names Claude Opus 5.5, Claude * Fable 5.1 and Claude Mythos 5.1 ("Forced tool use not supported", * platform.claude.com/docs/en/api/errors, read 2026-09-23). Claude Mythos * Preview is matched too although that page does not name it: a wrong * `true` is the safe direction (above), and no allowlist carries it, so it * sits outside the ggui#1268 pin. Fable 5, Mythos 5 and Opus 5 still * accept it. `auto` is accepted by all. The version separator is `-` in API * and Bedrock ids and `.` in OpenRouter's (`claude-opus-5.5`). */ export declare function anthropicRejectsForcedToolChoice(model: string): boolean; //# sourceMappingURL=anthropic-model-rules.d.ts.map