Lowering matrix
Generated by typecast.lower.LoweringMatrixDocSuite from the real renderers: every
cell is derived by rendering a probe schema with and without the feature and
cross-checking the wire output against the DroppedFeature report. Regenerate with
sbt core/test (the suite rewrites this file and fails when it is stale).
Outcomes (SPEC ยง5.3):
- OnWire โ expressed to the provider: a JSON Schema keyword on the wire, or visible notation in the compact prompt block.
- ValidatedPostHoc โ not expressible for that mode; the constraint stays in the IR and stage-3 validation enforces it, feeding targeted retries.
Provider modes
json-mode and prompt-only both receive the schema as the compact prompt block
(they differ only in the provider's JSON guarantee), so their lowering behaviour is
identical. openai-strict mirrors OpenAi.StrictSubset; anthropic-like is
SchemaSubset.full minus numeric bounds and string lengths.
| Mode | Channel | numericBounds | stringLength | pattern | format | unions | optionalFields | additionalPropertiesFalse |
|---|---|---|---|---|---|---|---|---|
| full | wire JSON Schema | true | true | true | true | true | true | true |
| openai-strict | wire JSON Schema | false | false | false | false | true | false | true |
| anthropic-like | wire JSON Schema | false | false | true | true | true | true | true |
| json-mode | compact prompt | true | true | true | true | true | true | true |
| prompt-only | compact prompt | true | true | true | true | true | true | true |
Constraints
| Feature | full | openai-strict | anthropic-like | json-mode | prompt-only |
|---|---|---|---|---|---|
| MinNumber(0) | OnWire | ValidatedPostHoc | ValidatedPostHoc | OnWire | OnWire |
| MaxNumber(100) | OnWire | ValidatedPostHoc | ValidatedPostHoc | OnWire | OnWire |
| MultipleOf(2) | OnWire | ValidatedPostHoc | ValidatedPostHoc | OnWire | OnWire |
| MinLength(1) | OnWire | ValidatedPostHoc | ValidatedPostHoc | OnWire | OnWire |
| MaxLength(64) | OnWire | ValidatedPostHoc | ValidatedPostHoc | OnWire | OnWire |
| Pattern([a-z]+) | OnWire | ValidatedPostHoc | OnWire | OnWire | OnWire |
| Format(email) | OnWire | ValidatedPostHoc | OnWire | OnWire | OnWire |
| MinItems(1) | OnWire | OnWire | OnWire | OnWire | OnWire |
| MaxItems(10) | OnWire | OnWire | OnWire | OnWire | OnWire |
| UniqueItems | OnWire | OnWire | OnWire | OnWire | OnWire |
Structural features
| Feature | full | openai-strict | anthropic-like | json-mode | prompt-only |
|---|---|---|---|---|---|
| tagged union (SUnion) | OnWire (oneOf) | OnWire (anyOf) | OnWire (oneOf) | OnWire (A \| B notation) |
OnWire (A \| B notation) |
| optional field (SOptional) | OnWire (omitted from required) | ValidatedPostHoc (required + null-union on the wire) | OnWire (omitted from required) | OnWire (? notation) |
OnWire (? notation) |
| closed object (additionalProperties: false) | OnWire | OnWire | OnWire | ValidatedPostHoc (unknown-field policy post-hoc) | ValidatedPostHoc (unknown-field policy post-hoc) |
| string-keyed map (SMap) | OnWire (schema-valued additionalProperties) | ValidatedPostHoc (value schema erased; closed empty object on the wire) | OnWire (schema-valued additionalProperties) | OnWire ({ [key: string]: V } notation) |
OnWire ({ [key: string]: V } notation) |
| open object (additionalProperties: true) | OnWire (open by JSON Schema default (keyword omitted)) | ValidatedPostHoc (forced additionalProperties: false; unknown keys tolerated post-hoc) | OnWire (open by JSON Schema default (keyword omitted)) | ValidatedPostHoc (indistinguishable from closed in the prompt) | ValidatedPostHoc (indistinguishable from closed in the prompt) |