@aeye/core 0.5.2 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/aeye-core-schema.md +57 -4
- package/dist/schema.d.ts +281 -14
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +378 -55
- package/dist/schema.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -521,6 +521,7 @@ The descriptor's full field list is exported as the `FormatDescriptor` interface
|
|
|
521
521
|
| `optionalAsNullable` | Whether `optional` fields are emitted as `T \| null` (OpenAI strict) vs omitted from `required[]`. |
|
|
522
522
|
| `supportsRecursion` | Whether `$ref` self-reference works under this dialect. |
|
|
523
523
|
| `maxStrictTools` / `maxStrictOptionalParams` / `maxStrictUnionTypes` | Per-request budget caps; `undefined` means no documented limit. |
|
|
524
|
+
| `schemaSizeLimits` | Per-SCHEMA size ceilings (properties, nesting, total string characters, enum values); `undefined` means no documented limit. An over-size schema degrades on its own, even when it asked for `strict: true`. |
|
|
524
525
|
|
|
525
526
|
You don't need to set every field — spread an existing descriptor and override deltas. Tested via `analyzeSchema` + the schema test suite; see the strict-mode guide in `@aeye/docs` for end-to-end examples.
|
|
526
527
|
|
package/aeye-core-schema.md
CHANGED
|
@@ -34,6 +34,56 @@ A descriptor (see `src/schema.ts` line ~26 for the fully documented interface) d
|
|
|
34
34
|
| `supportedStringFormats` | `'all'` or a `Set<string>` whitelist. |
|
|
35
35
|
| `supportsRecursion` | Whether `$ref` self-reference works. |
|
|
36
36
|
| `maxStrictTools` / `maxStrictOptionalParams` / `maxStrictUnionTypes` | Per-request slot budgets (`undefined` = no documented limit). |
|
|
37
|
+
| `schemaSizeLimits` | Per-SCHEMA size ceilings — properties, nesting, total string characters, enum values (`undefined` = no documented limit) — see below. |
|
|
38
|
+
| `maxEnumValues` | Opt-in ceiling on how many values ONE emitted `enum` may carry (`undefined` = no cap, and that is what every built-in declares) — see below. |
|
|
39
|
+
|
|
40
|
+
### `schemaSizeLimits` — how BIG one strict schema may be
|
|
41
|
+
|
|
42
|
+
Separate from the per-request slot budgets above: every bound here is a **sum over ONE schema** (one tool's `parameters`, or one structured-output schema), so no other item in the request can change the verdict. `SchemaBudget` therefore treats an over-size schema as a feasibility failure rather than a budget one — that single item degrades to the family's non-strict descriptor **even when it asked for `strict: true`**, and the rest of the request is untouched.
|
|
43
|
+
|
|
44
|
+
```typescript
|
|
45
|
+
interface SchemaSizeLimits {
|
|
46
|
+
maxObjectProperties: number; // summed over every nesting level
|
|
47
|
+
maxNestingDepth: number; // levels of nested containers below the root
|
|
48
|
+
maxTotalStringChars: number; // property names + enum values + const values
|
|
49
|
+
maxTotalEnumValues: number; // summed across every enum property
|
|
50
|
+
largeEnumValueCount: number; // the single-enum value count above which…
|
|
51
|
+
maxLargeEnumStringChars: number; // …that one enum's string values are also bounded
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**`OPENAI_STRICT` is the only built-in that declares them**, because Structured Outputs is the only one of the three dialects that documents them. Verified against developers.openai.com "Supported schemas" on 2026-08-23: *"A schema may have up to 5000 object properties total, with up to 10 levels of nesting"*, *"total string length of all property names, definition names, enum values, and const values cannot exceed 120,000 characters"*, *"A schema may have up to 1000 enum values across all enum properties"*, and *"For a single enum property with string values, the total string length of all enum values cannot exceed 15,000 characters when there are more than 250 enum values"*. Every one of those was raised in July 2025 (100→5000 properties, 15,000→120,000 characters, 500→1000 enum values, 7,500→15,000 for the >250-value enum); the pre-raise numbers are still widely quoted secondhand.
|
|
56
|
+
|
|
57
|
+
Scope is Structured Outputs — a tool carrying `strict: true`, or a `json_schema` response format. Non-strict function calling is best-effort with no compiled decoder, which is exactly why degrading the offending item is a complete answer rather than a partial one.
|
|
58
|
+
|
|
59
|
+
`checkSchemaSizeLimits(schema, descriptor)` is the public form and returns one line per bound broken (empty = it fits, or the dialect publishes none) — the answer to "why did my tool silently stop being strict?".
|
|
60
|
+
|
|
61
|
+
The measurement is taken from the **Zod** schema rather than from the emitted JSON, so where an encoding is descriptor-dependent it counts the widest one (a record as its `{key, value}` pair form, a tuple as its numeric-key form). Over-counting costs strictness on a schema that would have fitted; under-counting costs an HTTP 400, so the rounding goes up. `$defs` entry names are not counted: they are generated at emit time, few, and short against a 120,000-character budget.
|
|
62
|
+
|
|
63
|
+
### `maxEnumValues` — an opt-in dialect ceiling that WIDENS, and why no built-in sets one
|
|
64
|
+
|
|
65
|
+
Some providers may reject a schema whose `enum` is simply too long. That is **not** one of the per-request budgets above: those are strict-mode allowances the `SchemaBudget` spends across a whole request, degrading an item that no longer fits to the family's non-strict descriptor, whereas this one would fire whatever the strictness, so it is enforced structurally at the point an `enum` is emitted.
|
|
66
|
+
|
|
67
|
+
Over the cap the emitter **widens** — it does not truncate. It drops the `enum` keyword, emits the node's plain scalar `type`, and puts **every** value into the `description`:
|
|
68
|
+
|
|
69
|
+
```jsonc
|
|
70
|
+
// z.enum([...20 values]) under a descriptor with maxEnumValues: 8
|
|
71
|
+
{ "type": "string", "description": "One of these 20 values: name_0, name_1, …, name_19" }
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Truncating would make the values past the cap **unreachable** — the wire schema would constrain them away, so a caller whose 96 values are all legitimately selectable would lose 56 of them. Widening removes only the cardinality the dialect cannot compile, and the model keeps complete information. If the source schema carries its own `.describe()`, the value list is appended to it rather than replacing it.
|
|
75
|
+
|
|
76
|
+
The trade is enforcement: a widened node no longer rejects a value structurally, so whatever validates the model's output afterwards must. `Tool.parse` does — it runs against the ORIGINAL zod schema, whose `enum` is untouched — so a hallucinated member comes back as a normal, re-promptable validation error.
|
|
77
|
+
|
|
78
|
+
**No built-in descriptor declares a cap, and that is a measured result.** The field exists because a large `enum` was believed to make Gemini answer `400 INVALID_ARGUMENT`. Measured against `google/gemini-3-flash-preview` through OpenRouter (2026-08-23), it does not: single-parameter enums at 50/64/72/80/96/128/256/512/1024/**2048** values (52 KB of tool schema) all returned HTTP 200 with the expected tool call, under `tool_choice` both `required` (which is what makes Gemini compile a decoding grammar) and `auto` — as did 96 values with 80-character members, 20 tools each carrying a 96-value enum in one request, a 96-value enum next to `strict: true` / `minItems` / `propertyOrdering` / a sibling `anyOf`, and a 2048-value enum inside a `response_format` schema. Reliability was compared too, since a cap's whole cost is losing the enum's can't-hallucinate guarantee: 10 trials each of `enum` vs plain-string-with-full-list, over confusable near-duplicate names, at 96 and again at 512 values — both picked the correct member 10/10 with zero off-list answers.
|
|
79
|
+
|
|
80
|
+
A second pass answered the obvious objection — that an isolated probe is not what a real session sends. Same date and model, upstream **pinned to Google AI Studio** with fallbacks off (the upstream that served the production failures), an eleven-tool roster emitted through this library for a Google model and modelled on a real kind-authoring agent (`fn_load` / `fn_search` / `type_load` / `api_signature` / `api_set` / …, real descriptions, real system prompt): a 96-value enum on one of those tools returned 200 with the expected tool call under `tool_choice` `required` and `auto` alike, as did the same roster at 8 values and a tool carrying a bare typeless `{}` property.
|
|
81
|
+
|
|
82
|
+
The caveat that keeps that from being proof: the **control** — the recursive `$defs/Any` shape documented elsewhere in this file as 100% reproducible HTTP 400 — also returned 200, pinned and unpinned, forced and automatic, both hand-built and as the product's real 32 KB gin `api_set` schema. That failure class is not visible from this route today, so treat the numbers as evidence, not a verdict.
|
|
83
|
+
|
|
84
|
+
One trap for whoever measures this next: at `max_tokens: 64` the `$defs/Any` tool answered `finish_reason: "length"` with no tool call and empty content, which reads exactly like a grammar that produced nothing. It is not — this model spends reasoning tokens first, and at 400 the identical request emitted a correct call in 28 output tokens. Give a forced-tool probe room before calling an empty completion a failure.
|
|
85
|
+
|
|
86
|
+
So: **set this only against a measured provider rejection, and set it as high as the measurement allows.** An `enum` that fits is the more correct encoding, because it is the one the model cannot answer outside of.
|
|
37
87
|
|
|
38
88
|
### `anyEncoding` — and what each mode requires
|
|
39
89
|
|
|
@@ -80,8 +130,9 @@ strictPriority(requested: boolean | number | undefined): number
|
|
|
80
130
|
|
|
81
131
|
- `toJSONSchema` accepts a descriptor, a `ToJSONSchemaOptions` object, or a boolean (back-compat: `true` ⇒ `OPENAI_STRICT`, `false` ⇒ `LENIENT`).
|
|
82
132
|
- `strictify` rewrites a Zod schema in place per the descriptor (results cached in a WeakMap; same OOM-safe pattern as `analyzeSchema`).
|
|
83
|
-
- `analyzeSchema` returns `SchemaFeatures`: `{ hasRecursion, optionalParameterCount, unionTypeCount, recordCount, tupleCount }` — cached per schema.
|
|
84
|
-
- `
|
|
133
|
+
- `analyzeSchema` returns `SchemaFeatures`: `{ hasRecursion, optionalParameterCount, unionTypeCount, recordCount, tupleCount, enums, objectPropertyCount, maxNestingDepth, stringSizeChars }` — cached per schema. The last four feed `schemaSizeLimits`; `enums` keeps a per-enum `{valueCount, stringValueChars}` breakdown because the large-enum character rule is conditional on that SAME enum's value count, which a pair of totals cannot answer.
|
|
134
|
+
- `checkSchemaSizeLimits(schema, descriptor)` reports the per-schema size bounds a schema breaks (see `schemaSizeLimits`).
|
|
135
|
+
- `checkDescriptorConsistency` reports settings that ask the emitter for a keyword the same descriptor forbids (`anyEncoding` vs `allowAnyOf` / `allowDefsRef` / `supportsRecursion`), or a limit that would quietly stop governing anything: a `maxEnumValues` below 1 or non-integer (which widens every enum the dialect emits), a non-positive `schemaSizeLimits` bound (which degrades every schema), a `largeEnumValueCount` at or above `maxTotalEnumValues` (unreachable rule), or size limits on a non-strict descriptor (the API applies none). `registerDescriptor` runs it and `console.warn`s each problem, because otherwise the first report of a contradiction is a provider HTTP 400.
|
|
85
136
|
|
|
86
137
|
```typescript
|
|
87
138
|
import { OPENAI_STRICT, ANTHROPIC_STRICT, getDescriptor, toJSONSchema } from '@aeye/core';
|
|
@@ -103,11 +154,13 @@ toJSONSchema(schema, false); // === LENIENT
|
|
|
103
154
|
`new SchemaBudget(descriptor)` allocates strict "slots" across a single request when a descriptor has per-request limits (e.g. Anthropic). Providers call:
|
|
104
155
|
|
|
105
156
|
```typescript
|
|
106
|
-
budget.allocateTool(schema, requested): FormatDescriptor // returns strict or
|
|
157
|
+
budget.allocateTool(schema, requested): FormatDescriptor // returns strict or the family's non-strict, decrements
|
|
107
158
|
budget.allocateOutput(schema, requested): FormatDescriptor // output schema; consumes param/union budget, not a tool slot
|
|
108
159
|
```
|
|
109
160
|
|
|
110
|
-
It
|
|
161
|
+
It falls back when `requested === false`, when the schema uses an unrepresentable feature, when the schema exceeds the dialect's `schemaSizeLimits`, or when a positive-number request can't fit the remaining budget (priority order; `true` always wins subject to *budget*, never subject to feasibility or size).
|
|
162
|
+
|
|
163
|
+
**The fallback is the descriptor's own family, non-strict — never the family-blind `LENIENT`.** A dialect rule can outlive strict mode: `GOOGLE_NON_STRICT` exists for exactly one such rule, the `unconstrained` encoding of `z.any()`, because Gemini compiles a decoding grammar whenever a tool call is forced and no per-tool `strict` flag is involved. Degrading to `LENIENT` put the self-referencing `$defs/Any` that encoding was created to avoid straight back on the Google wire — and did so for *every* schema that degrades, which under `GOOGLE_STRICT` (`allowAnyOf: false`) is every recursive gin/query program schema there is. For the other families the change is behaviour-neutral by construction: `OPENAI_NON_STRICT` / `ANTHROPIC_NON_STRICT` are `LENIENT` with a family tag, and a family that registers no non-strict variant resolves to `LENIENT`. Only the `descriptor` id pinned on the tool differs, and it round-trips through `getDescriptorById`.
|
|
111
164
|
|
|
112
165
|
"Unrepresentable" here means a **combinator the descriptor forbids** (`z.union` → `anyOf`, `z.intersection` → `allOf`), because nothing rewrites those away — a schema carrying one under `GOOGLE_STRICT` is a provider HTTP 400. **Recursion is not unrepresentable**: the emitter replaces any back-edge the descriptor cannot spell with a bounded placeholder, so a recursive schema stays strict (looser at the back-edge, never rejected). That is the difference between this check and `canExpress`, which additionally treats a widened back-edge as a reason to fall back — the right answer for a structured *output* (it can be delivered as prompt text instead) and the wrong one for a *tool* (it cannot).
|
|
113
166
|
|
package/dist/schema.d.ts
CHANGED
|
@@ -11,6 +11,48 @@ import z from 'zod';
|
|
|
11
11
|
* registry functions, model declarations, etc.
|
|
12
12
|
*/
|
|
13
13
|
export type DescriptorFamily = 'openai' | 'anthropic' | 'google' | (string & {});
|
|
14
|
+
/**
|
|
15
|
+
* Documented ceilings on how BIG one strict schema may be, as opposed to which
|
|
16
|
+
* keywords it may use. Every limit here is a SUM taken over a single schema —
|
|
17
|
+
* one tool's `parameters`, or one structured-output schema — not a per-request
|
|
18
|
+
* allowance shared between them (that is `maxStrictTools` and friends, which
|
|
19
|
+
* the `SchemaBudget` spends across the whole request).
|
|
20
|
+
*
|
|
21
|
+
* A schema that exceeds one of these is a guaranteed provider rejection under
|
|
22
|
+
* strict mode, so `SchemaBudget.allocate` treats it like any other
|
|
23
|
+
* infeasibility and degrades that ONE item to the family's non-strict
|
|
24
|
+
* descriptor, where no size rule applies. The rest of the request is
|
|
25
|
+
* unaffected.
|
|
26
|
+
*
|
|
27
|
+
* Declared as one object rather than six optional fields on purpose: a
|
|
28
|
+
* provider documents these together, and the object being present is what says
|
|
29
|
+
* "this dialect publishes size limits". Adding a rule here is then a compile
|
|
30
|
+
* error at every descriptor that declares the group, which is the point
|
|
31
|
+
* (a missed limit is invisible until a 400).
|
|
32
|
+
*/
|
|
33
|
+
export interface SchemaSizeLimits {
|
|
34
|
+
/** Maximum object properties in one schema, summed over every nesting level. */
|
|
35
|
+
readonly maxObjectProperties: number;
|
|
36
|
+
/** Maximum levels of nested containers below the schema root. */
|
|
37
|
+
readonly maxNestingDepth: number;
|
|
38
|
+
/**
|
|
39
|
+
* Maximum total characters over the schema's property names, `enum` values
|
|
40
|
+
* and `const` values together.
|
|
41
|
+
*/
|
|
42
|
+
readonly maxTotalStringChars: number;
|
|
43
|
+
/** Maximum `enum` values summed across every enum property in one schema. */
|
|
44
|
+
readonly maxTotalEnumValues: number;
|
|
45
|
+
/**
|
|
46
|
+
* The single-enum value count above which `maxLargeEnumStringChars` starts
|
|
47
|
+
* to apply. A smaller enum is bounded only by the two totals above.
|
|
48
|
+
*/
|
|
49
|
+
readonly largeEnumValueCount: number;
|
|
50
|
+
/**
|
|
51
|
+
* Maximum total characters of ONE enum's string values, applied only to an
|
|
52
|
+
* enum carrying more than `largeEnumValueCount` values.
|
|
53
|
+
*/
|
|
54
|
+
readonly maxLargeEnumStringChars: number;
|
|
55
|
+
}
|
|
14
56
|
/**
|
|
15
57
|
* Format descriptor — describes the JSON Schema dialect of a target.
|
|
16
58
|
*
|
|
@@ -95,6 +137,110 @@ export interface FormatDescriptor {
|
|
|
95
137
|
readonly maxStrictOptionalParams?: number;
|
|
96
138
|
/** Maximum total union-type parameters across all strict schemas in one request. */
|
|
97
139
|
readonly maxStrictUnionTypes?: number;
|
|
140
|
+
/**
|
|
141
|
+
* Documented ceilings on the SIZE of one strict schema (properties, nesting,
|
|
142
|
+
* total string bytes, enum values), or `undefined` when the dialect
|
|
143
|
+
* publishes none. See {@link SchemaSizeLimits} for what each bound counts and
|
|
144
|
+
* why it is per-schema rather than per-request.
|
|
145
|
+
*
|
|
146
|
+
* Only a STRICT descriptor declares these: they are Structured-Outputs rules
|
|
147
|
+
* — the API compiles the schema into a decoder and rejects one it cannot —
|
|
148
|
+
* and a non-strict schema is a best-effort hint the API does not compile. So
|
|
149
|
+
* degrading the offending item to the family's non-strict descriptor is both
|
|
150
|
+
* the fix and the reason the limits stop applying to it
|
|
151
|
+
* (`SchemaBudget.allocate`, `checkSchemaSizeLimits`).
|
|
152
|
+
*
|
|
153
|
+
* The measurement is taken from the ZOD schema, not from the emitted JSON,
|
|
154
|
+
* so it is deliberately CONSERVATIVE where an encoding is descriptor-
|
|
155
|
+
* dependent (a record counts as its widest encoding, a tuple as its
|
|
156
|
+
* numeric-key one). Over-counting costs strictness on a schema that would
|
|
157
|
+
* have fit; under-counting costs an HTTP 400, so the round goes up.
|
|
158
|
+
*/
|
|
159
|
+
readonly schemaSizeLimits?: SchemaSizeLimits;
|
|
160
|
+
/**
|
|
161
|
+
* Maximum number of values ONE emitted `enum` may carry, or `undefined`
|
|
162
|
+
* (the default) for no cap.
|
|
163
|
+
*
|
|
164
|
+
* This is deliberately NOT one of the per-request budget fields above. Those
|
|
165
|
+
* are strict-mode allowances the SchemaBudget spends across a whole request,
|
|
166
|
+
* degrading an item that no longer fits to the family's non-strict
|
|
167
|
+
* descriptor; this one is a property of the dialect itself — it fires whatever the strictness — so it is enforced
|
|
168
|
+
* structurally at the point an `enum` is emitted (`convertSchema`), where
|
|
169
|
+
* the cardinality is actually known.
|
|
170
|
+
*
|
|
171
|
+
* Over the cap the emitter **widens** rather than truncates: it drops the
|
|
172
|
+
* `enum` keyword entirely, emits the node's plain scalar `type`
|
|
173
|
+
* (`{type: 'string'}` for a string enum), and puts EVERY value into the
|
|
174
|
+
* node's `description`. Nothing becomes unreachable — the model still has
|
|
175
|
+
* the complete list and can name any member — and the cardinality the
|
|
176
|
+
* dialect could not compile is simply no longer on the wire.
|
|
177
|
+
*
|
|
178
|
+
* The trade this makes is enforcement: a widened node no longer rejects a
|
|
179
|
+
* value structurally, so whatever validates the model's output afterwards
|
|
180
|
+
* has to. `Tool.parse` does, against the ORIGINAL zod schema — the enum is
|
|
181
|
+
* still there, only the emitted JSON Schema widened — so a hallucinated
|
|
182
|
+
* member comes back as a normal, re-promptable validation error.
|
|
183
|
+
*
|
|
184
|
+
* **`GOOGLE_STRICT`/`GOOGLE_NON_STRICT` declare 40. Every other built-in
|
|
185
|
+
* declares no cap.** Two earlier rounds of live measurement against
|
|
186
|
+
* `google/gemini-3-flash-preview` through OpenRouter (2026-08-23) — single
|
|
187
|
+
* enums up to 2048 SYNTHETIC values, 20 tools each with a 96-value enum, and
|
|
188
|
+
* an eleven-tool roster modelled on a real kind-authoring agent — all
|
|
189
|
+
* returned HTTP 200 and concluded there was no reproducible limit. **That
|
|
190
|
+
* conclusion was wrong, because none of those enums used the CONTENT of a
|
|
191
|
+
* real session.** A third round replayed the exact wire bytes of a real
|
|
192
|
+
* product request — `fn_load`'s `names` array, enum-constrained to the
|
|
193
|
+
* session's actual 98 known component/fn names (`default_renderer`,
|
|
194
|
+
* `QueryWidget`, `ConfirmPrompt`, `list_widget_types`, …) — and it 400'd,
|
|
195
|
+
* reproducibly, twice, byte-for-byte identical to what the provider was
|
|
196
|
+
* actually sent. Bisecting that same real value list: 90 values passes, 93
|
|
197
|
+
* fails. Bisecting what changes between the passing synthetic probes and the
|
|
198
|
+
* failing real one: 98 SHORT synthetic values (`n0`..`n97`, 284 chars) pass;
|
|
199
|
+
* 206 short values matching the REAL list's total character count (714
|
|
200
|
+
* chars) also pass; only the REAL, longer, dictionary-like/identifier-shaped
|
|
201
|
+
* values fail, and only past ~92 of them. So the limit tracks neither raw
|
|
202
|
+
* member count nor total character/byte budget — most likely actual
|
|
203
|
+
* tokenized grammar-state count, which short repetitive synthetic strings
|
|
204
|
+
* compress far below what real identifier text does at the same count or
|
|
205
|
+
* character budget. This is why the first two rounds' synthetic and
|
|
206
|
+
* lightly-realistic probes never tripped it.
|
|
207
|
+
*
|
|
208
|
+
* **The widen-to-string fallback this field triggers was verified against
|
|
209
|
+
* the exact failing real schema**: dropping `enum` and putting the same 98
|
|
210
|
+
* values into the `description` of a plain string field returned HTTP 200
|
|
211
|
+
* with the expected tool call — confirming the fallback mechanism actually
|
|
212
|
+
* fixes the failure it exists for, not just a synthetic stand-in.
|
|
213
|
+
*
|
|
214
|
+
* **40 is not a measured edge — it is a conservative floor with roughly 2x
|
|
215
|
+
* margin under the real one (90 passes / 93 fails) measured on this one real
|
|
216
|
+
* value set.** Given the failure tracks content, not just count, a different
|
|
217
|
+
* session's actual name list could plausibly fail at a different count; 40
|
|
218
|
+
* was also the cap this exact product ran under in production for months
|
|
219
|
+
* before a since-reverted attempt to remove it, which is corroborating
|
|
220
|
+
* evidence it holds in practice, not just in this one measurement.
|
|
221
|
+
*
|
|
222
|
+
* The reliability comparison from the earlier rounds still stands and is
|
|
223
|
+
* why a cap is preferable to leaving every enum uncapped "to be safe" at a
|
|
224
|
+
* much lower number: `enum` vs plain-string-with-full-list, 10 trials each
|
|
225
|
+
* over confusable near-duplicate names at 96 and 512 values, scored 10/10
|
|
226
|
+
* on-target with zero off-list answers for BOTH encodings. So there is no
|
|
227
|
+
* reliability cost to raising this cap later if a higher safe value is
|
|
228
|
+
* measured — only downside risk to leaving it too high.
|
|
229
|
+
*
|
|
230
|
+
* One trap for whoever measures this next: with `max_tokens` at 64, a
|
|
231
|
+
* forced-tool probe can come back `finish_reason: 'length'` with no tool
|
|
232
|
+
* call and empty content, which reads exactly like a grammar that produced
|
|
233
|
+
* nothing. It usually is not — this model spends reasoning tokens first.
|
|
234
|
+
* Give a forced-tool probe room before calling an empty completion a
|
|
235
|
+
* failure.
|
|
236
|
+
*
|
|
237
|
+
* So: set this only where a provider is MEASURED to reject a large enum
|
|
238
|
+
* using the SESSION'S OWN real content, not synthetic stand-ins, and set it
|
|
239
|
+
* conservatively below the measured edge until more value sets are tested.
|
|
240
|
+
* An `enum` that fits is the more correct encoding, because it is the one
|
|
241
|
+
* the model cannot answer outside of.
|
|
242
|
+
*/
|
|
243
|
+
readonly maxEnumValues?: number;
|
|
98
244
|
/**
|
|
99
245
|
* Whether the descriptor can express recursive `$ref` schemas (`$ref: '#'`
|
|
100
246
|
* to root, or any `$ref: '#/$defs/X'` whose target transitively references
|
|
@@ -141,10 +287,28 @@ export declare const LENIENT: FormatDescriptor;
|
|
|
141
287
|
* tuples→numeric-keys, optional→nullable.
|
|
142
288
|
*
|
|
143
289
|
* No documented per-request slot limit (max strict tools / optional params /
|
|
144
|
-
* union types)
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
*
|
|
290
|
+
* union types) — the SchemaBudget treats those caps as `undefined` for OpenAI.
|
|
291
|
+
*
|
|
292
|
+
* OpenAI DOES document per-SCHEMA size limits for Structured Outputs, and they
|
|
293
|
+
* are declared below (`schemaSizeLimits`). Verified against
|
|
294
|
+
* developers.openai.com/api/docs/guides/structured-outputs on 2026-08-23,
|
|
295
|
+
* section "Supported schemas": *"A schema may have up to 5000 object
|
|
296
|
+
* properties total, with up to 10 levels of nesting"*, *"total string length of
|
|
297
|
+
* all property names, definition names, enum values, and const values cannot
|
|
298
|
+
* exceed 120,000 characters"*, *"A schema may have up to 1000 enum values
|
|
299
|
+
* across all enum properties"*, and *"For a single enum property with string
|
|
300
|
+
* values, the total string length of all enum values cannot exceed 15,000
|
|
301
|
+
* characters when there are more than 250 enum values"*. Every one of those
|
|
302
|
+
* numbers was raised in July 2025 (100→5000 properties, 15,000→120,000
|
|
303
|
+
* characters, 500→1000 enum values, 7,500→15,000 for the >250-value enum) —
|
|
304
|
+
* the pre-raise figures are still widely quoted secondhand, so they are named
|
|
305
|
+
* here to keep a future reader from "correcting" these downward.
|
|
306
|
+
*
|
|
307
|
+
* Scope is Structured Outputs, i.e. a tool carrying `strict: true` or a
|
|
308
|
+
* `json_schema` response format — the function-calling guide defines strict
|
|
309
|
+
* mode as "leveraging our structured outputs feature", and non-strict function
|
|
310
|
+
* calling is best-effort with no compiled decoder. That is exactly why
|
|
311
|
+
* degrading the over-size item to `OPENAI_NON_STRICT` is a complete answer.
|
|
148
312
|
*/
|
|
149
313
|
export declare const OPENAI_STRICT: FormatDescriptor;
|
|
150
314
|
/** OpenAI non-strict — alias of LENIENT but tagged with the openai family. */
|
|
@@ -192,10 +356,21 @@ export declare const ANTHROPIC_NON_STRICT: FormatDescriptor;
|
|
|
192
356
|
* this descriptor used to declare was a schema it says it cannot emit.
|
|
193
357
|
* Gemini compiles the tool schemas into a decoding grammar whenever the
|
|
194
358
|
* caller forces a tool call (`toolChoice: 'required'` → Google's function
|
|
195
|
-
* calling mode `ANY`), and a self-referencing `$defs/Any`
|
|
196
|
-
* compile with `400 INVALID_ARGUMENT` — the same request
|
|
359
|
+
* calling mode `ANY`), and a self-referencing `$defs/Any` failed that
|
|
360
|
+
* compile with `400 INVALID_ARGUMENT` — the same request succeeded under
|
|
197
361
|
* `toolChoice: 'auto'`, where no grammar is built. Reported against
|
|
198
|
-
* `google/gemini-3-flash-preview` via OpenRouter
|
|
362
|
+
* `google/gemini-3-flash-preview` via OpenRouter as 100% reproducible.
|
|
363
|
+
*
|
|
364
|
+
* **That 400 no longer reproduces (re-measured 2026-08-23)** and the
|
|
365
|
+
* encoding stays anyway. Same model, same route, upstream pinned to Google
|
|
366
|
+
* AI Studio with fallbacks off, `tool_choice` forced to one named tool: the
|
|
367
|
+
* hand-built recursive `$defs/Any` tool, and the product's real 32 KB gin
|
|
368
|
+
* `api_set` schema carrying nine `#/$defs/Any` references, both answered
|
|
369
|
+
* HTTP 200 with a valid tool call. So the upstream either fixed or now
|
|
370
|
+
* sanitizes it. The descriptor still declares what this dialect's own
|
|
371
|
+
* documented keyword list supports; depending on a provider's current
|
|
372
|
+
* leniency for a shape we say it cannot express is how the first version of
|
|
373
|
+
* this descriptor shipped a guaranteed 400 in the first place.
|
|
199
374
|
*/
|
|
200
375
|
export declare const GOOGLE_STRICT: FormatDescriptor;
|
|
201
376
|
/**
|
|
@@ -217,7 +392,8 @@ export declare const GOOGLE_STRICT: FormatDescriptor;
|
|
|
217
392
|
export declare const GOOGLE_NON_STRICT: FormatDescriptor;
|
|
218
393
|
/**
|
|
219
394
|
* Report the ways a `FormatDescriptor` contradicts itself — settings that ask
|
|
220
|
-
* the emitter to produce a keyword the same descriptor forbids
|
|
395
|
+
* the emitter to produce a keyword the same descriptor forbids, or a limit
|
|
396
|
+
* that would quietly strip every constraint it governs. Returns one
|
|
221
397
|
* human-readable line per problem; an empty array means the descriptor is
|
|
222
398
|
* internally consistent.
|
|
223
399
|
*
|
|
@@ -463,10 +639,27 @@ export interface JSONSchema {
|
|
|
463
639
|
* ```
|
|
464
640
|
*/
|
|
465
641
|
export declare function toJSONSchema(schema: z.ZodType, options: ToJSONSchemaOptions | boolean | FormatDescriptor): JSONSchema;
|
|
642
|
+
/**
|
|
643
|
+
* One emitted `enum` node's contribution to a dialect's size limits. A dialect
|
|
644
|
+
* bounds the TOTAL number of enum values in a schema and, separately, the
|
|
645
|
+
* character length of a SINGLE large enum — so the per-enum breakdown has to
|
|
646
|
+
* survive the walk; a pair of totals cannot answer the second question
|
|
647
|
+
* (two enums, one long-valued and one many-valued, would answer it wrongly).
|
|
648
|
+
*/
|
|
649
|
+
export interface EnumFeature {
|
|
650
|
+
/** How many members the enum emits. */
|
|
651
|
+
readonly valueCount: number;
|
|
652
|
+
/**
|
|
653
|
+
* Total character length of its STRING members. Non-string members
|
|
654
|
+
* contribute nothing: the character rules are written for string values.
|
|
655
|
+
*/
|
|
656
|
+
readonly stringValueChars: number;
|
|
657
|
+
}
|
|
466
658
|
/**
|
|
467
659
|
* Structural feature counts for a Zod schema, used by the SchemaBudget to
|
|
468
|
-
* decide whether an item fits a descriptor's per-request budget
|
|
469
|
-
* the
|
|
660
|
+
* decide whether an item fits a descriptor's per-request budget, whether it
|
|
661
|
+
* fits the dialect's per-schema size limits, and whether the descriptor can
|
|
662
|
+
* express it at all.
|
|
470
663
|
*/
|
|
471
664
|
export interface SchemaFeatures {
|
|
472
665
|
/** True if the schema (or any subschema) uses `z.lazy` / self-recursion. */
|
|
@@ -483,6 +676,25 @@ export interface SchemaFeatures {
|
|
|
483
676
|
recordCount: number;
|
|
484
677
|
/** Count of `z.tuple` nodes. */
|
|
485
678
|
tupleCount: number;
|
|
679
|
+
/** One entry per emitted `enum` node, in walk order. */
|
|
680
|
+
enums: readonly EnumFeature[];
|
|
681
|
+
/**
|
|
682
|
+
* Object properties the schema emits, summed over every nesting level. A
|
|
683
|
+
* record counts as the 2 properties its widest encoding emits
|
|
684
|
+
* (`{key, value}` pairs) and a tuple as one per item (numeric-key
|
|
685
|
+
* encoding) — the count is descriptor-independent, so it takes the largest
|
|
686
|
+
* encoding any dialect could choose (see `schemaSizeLimits`).
|
|
687
|
+
*/
|
|
688
|
+
objectPropertyCount: number;
|
|
689
|
+
/** Deepest container nesting below the root (an object of scalars is 1). */
|
|
690
|
+
maxNestingDepth: number;
|
|
691
|
+
/**
|
|
692
|
+
* Total characters over property names plus `enum` and `const` string
|
|
693
|
+
* values — the "total string size" a dialect bounds. `$defs` entry names are
|
|
694
|
+
* NOT included: they are generated at emit time, are few, and are short
|
|
695
|
+
* relative to a 120,000-character budget.
|
|
696
|
+
*/
|
|
697
|
+
stringSizeChars: number;
|
|
486
698
|
}
|
|
487
699
|
/**
|
|
488
700
|
* Walk a Zod schema once and count its structural features. Result is
|
|
@@ -497,14 +709,36 @@ export interface SchemaFeatures {
|
|
|
497
709
|
* request to a strict-family model (`SchemaBudget.allocate`).
|
|
498
710
|
*/
|
|
499
711
|
export declare function analyzeSchema(schema: z.ZodType | z.core.$ZodType): SchemaFeatures;
|
|
712
|
+
/**
|
|
713
|
+
* Report the ways ONE schema exceeds the descriptor's documented per-schema
|
|
714
|
+
* size limits (`FormatDescriptor.schemaSizeLimits`). Empty means it fits, or
|
|
715
|
+
* that the dialect publishes no limits.
|
|
716
|
+
*
|
|
717
|
+
* This is a FEASIBILITY question, not a budget one: the numbers bound a single
|
|
718
|
+
* schema, so no other tool in the request can change the answer, and
|
|
719
|
+
* `SchemaBudget.allocate` therefore treats a hit exactly like an
|
|
720
|
+
* unrepresentable keyword — that item degrades to the family's non-strict
|
|
721
|
+
* descriptor and the rest of the request is untouched.
|
|
722
|
+
*
|
|
723
|
+
* Exported because "why did my tool silently stop being strict?" needs an
|
|
724
|
+
* answer a caller can print; each line names the bound and the measurement.
|
|
725
|
+
*
|
|
726
|
+
* @example
|
|
727
|
+
* ```ts
|
|
728
|
+
* checkSchemaSizeLimits(z.object({ pick: z.enum(tenThousandNames) }), OPENAI_STRICT);
|
|
729
|
+
* // → ['enum values 10000 exceed maxTotalEnumValues 1000']
|
|
730
|
+
* ```
|
|
731
|
+
*/
|
|
732
|
+
export declare function checkSchemaSizeLimits(schema: z.ZodType | z.core.$ZodType, descriptor: FormatDescriptor): readonly string[];
|
|
500
733
|
/**
|
|
501
734
|
* Per-request strict-mode allocator.
|
|
502
735
|
*
|
|
503
736
|
* Constructed once per outgoing request with the chosen model's strictest
|
|
504
737
|
* descriptor. Tracks remaining slots (strict tools, optional parameters,
|
|
505
738
|
* union types) against the descriptor's documented per-request limits and
|
|
506
|
-
* decides per-tool / per-output whether to emit strict or fall back to
|
|
507
|
-
*
|
|
739
|
+
* decides per-tool / per-output whether to emit strict or fall back to the
|
|
740
|
+
* SAME FAMILY's non-strict descriptor (`degraded` — never the family-blind
|
|
741
|
+
* `LENIENT`, which would undo dialect rules that outlive strict mode).
|
|
508
742
|
*
|
|
509
743
|
* Selection guarantees that any tool with `strict: true` (hard requirement)
|
|
510
744
|
* has a model that supports the family — `allocate` therefore always grants
|
|
@@ -518,6 +752,29 @@ export declare function analyzeSchema(schema: z.ZodType | z.core.$ZodType): Sche
|
|
|
518
752
|
*/
|
|
519
753
|
export declare class SchemaBudget {
|
|
520
754
|
private readonly descriptor;
|
|
755
|
+
/**
|
|
756
|
+
* What an item that does NOT get strict is emitted through: the descriptor's
|
|
757
|
+
* own family, non-strict.
|
|
758
|
+
*
|
|
759
|
+
* It is deliberately NOT the family-blind `LENIENT`. A dialect restriction
|
|
760
|
+
* can belong to the DIALECT rather than to strict mode — `GOOGLE_NON_STRICT`
|
|
761
|
+
* exists for exactly one such rule, the `unconstrained` encoding of
|
|
762
|
+
* `z.any()`, because Gemini builds a decoding grammar whenever a tool call is
|
|
763
|
+
* forced, with no per-tool strict flag involved. Degrading to `LENIENT` put
|
|
764
|
+
* the self-referencing `$defs/Any` that encoding was created to avoid back on
|
|
765
|
+
* the Google wire — and it did so for every gin/query-style recursive `anyOf`
|
|
766
|
+
* schema, i.e. the schemas that ALWAYS degrade, since `GOOGLE_STRICT` cannot
|
|
767
|
+
* express `anyOf` at all (measured: the product's real `api_set` tool schema
|
|
768
|
+
* allocates to `lenient` under `GOOGLE_STRICT`, and its emitted JSON carries
|
|
769
|
+
* nine `#/$defs/Any` references).
|
|
770
|
+
*
|
|
771
|
+
* For the other families this is behaviour-neutral by construction:
|
|
772
|
+
* `OPENAI_NON_STRICT` and `ANTHROPIC_NON_STRICT` are `LENIENT` with a family
|
|
773
|
+
* tag, and a family with no registered non-strict variant resolves to
|
|
774
|
+
* `LENIENT` (`getDescriptor`). Only the pinned `descriptor` id on the tool
|
|
775
|
+
* changes, which round-trips through `getDescriptorById`.
|
|
776
|
+
*/
|
|
777
|
+
private readonly degraded;
|
|
521
778
|
private remainingTools;
|
|
522
779
|
private remainingOptionalParams;
|
|
523
780
|
private remainingUnionTypes;
|
|
@@ -526,12 +783,15 @@ export declare class SchemaBudget {
|
|
|
526
783
|
* Decide the effective descriptor for a tool's parameter schema given the
|
|
527
784
|
* dev's strict request, the schema's features, and the remaining budget.
|
|
528
785
|
*
|
|
529
|
-
* Returns `LENIENT`
|
|
786
|
+
* Returns the family's NON-STRICT descriptor (`LENIENT` for a family that
|
|
787
|
+
* registers none) when:
|
|
530
788
|
* - `requested === false`
|
|
531
789
|
* - the schema uses a feature the descriptor can't represent
|
|
790
|
+
* - the schema exceeds the dialect's per-schema size limits
|
|
791
|
+
* (`checkSchemaSizeLimits`)
|
|
532
792
|
* - the descriptor has slot limits and the budget is exhausted (only
|
|
533
793
|
* applies to `requested` being a positive number; `true` always wins
|
|
534
|
-
* subject to feasibility)
|
|
794
|
+
* subject to feasibility and size)
|
|
535
795
|
*
|
|
536
796
|
* Returns the strict descriptor (and decrements the budget) otherwise.
|
|
537
797
|
*/
|
|
@@ -557,6 +817,13 @@ export declare class SchemaBudget {
|
|
|
557
817
|
* shared between `convertTools` and `convertResponseFormat` — Anthropic's
|
|
558
818
|
* documented limits apply across the whole request, so the strictest
|
|
559
819
|
* descriptor wins.
|
|
820
|
+
*
|
|
821
|
+
* `schemaSizeLimits` deliberately does NOT participate. Those bounds are
|
|
822
|
+
* per-schema, so they are evaluated against whichever descriptor this returns
|
|
823
|
+
* rather than shared between the two — and every provider here passes two
|
|
824
|
+
* descriptors resolved from the SAME family, so there is nothing to break the
|
|
825
|
+
* tie on. Ranking six size bounds against three slot budgets would be an
|
|
826
|
+
* invented ordering, not a documented one.
|
|
560
827
|
*/
|
|
561
828
|
export declare function strictestOf(a: FormatDescript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