Record default repair budget decisions

This commit is contained in:
2026-11-20 19:10:24 +00:00
parent e1af2d6d9c
commit 63c96b7d61

View File

@@ -1,23 +1,41 @@
# Feature Considerations Before The Next Release
Status: candidates for discussion, not accepted implementation requirements.
Review these items before the next release; inclusion in this list does not
commit them to that release. Implemented schema support is documented in the
Status: item 1 records accepted design decisions; item 2 remains a discussion
candidate. Review these items before the next release; this document does not
authorize implementation or commit either item to that release. Implemented schema
support is documented in the
[format reference](../formats.md#schemas).
## 1. Enable One Structured-Output Repair Attempt By Default
Consider changing the default number of structured-output repair attempts from
zero to one. The intended benefit is automatic recovery from an invalid structured
response without requiring each consumer to opt in.
**Accepted:** default to one repair attempt for every validation mode that
supports repair. This gives structurally invalid or empty output one automatic
correction opportunity without requiring each consumer to opt in.
Before accepting, settle:
| Validation mode | Default repair attempts |
| --- | ---: |
| `none` | 0 |
| `basic` | 1 |
| `json` | 1 |
| `json_schema` | 1 |
- Which validation modes and execution paths receive the default.
- How callers explicitly select zero attempts, including Go values where zero
may currently also represent omission.
- How to communicate the possibility of an additional inference request, with
corresponding latency and usage, when repair is needed.
Use a presence-aware public `RepairAttempts` field: omission selects the mode's
default; explicit zero disables repairs. Retain explicit budgets of two or three
for eligible modes. Keep the existing rejection of positive budgets for `none`.
Choose one rather than two as the default; consumers can opt into another
correction opportunity when appropriate for their workloads.
Apply defaults after ConfigKit composition, preserving explicit values. Execution
and inspection use the resolved concrete budget. Apply the same mode defaults to
omitted runtime output-contract budgets; runtime contracts still replace the
configured contract completely. Prepared execution retains its resolved budget.
Implementation planning must specify the presence-aware Go shape and migration
from the current integer field, and cover omission versus explicit zero across
configuration, typed helpers, and runtime contracts. Document that repair runs
only after failed validation and can add generation latency and usage. Existing
repair accounting, exhaustion, cancellation, and transient-retry semantics remain
unchanged; the change does not promise successful correction.
## 2. Place Configuration Under A Root-Level `promptkit` Key