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 # Feature Considerations Before The Next Release
Status: candidates for discussion, not accepted implementation requirements. Status: item 1 records accepted design decisions; item 2 remains a discussion
Review these items before the next release; inclusion in this list does not candidate. Review these items before the next release; this document does not
commit them to that release. Implemented schema support is documented in the authorize implementation or commit either item to that release. Implemented schema
support is documented in the
[format reference](../formats.md#schemas). [format reference](../formats.md#schemas).
## 1. Enable One Structured-Output Repair Attempt By Default ## 1. Enable One Structured-Output Repair Attempt By Default
Consider changing the default number of structured-output repair attempts from **Accepted:** default to one repair attempt for every validation mode that
zero to one. The intended benefit is automatic recovery from an invalid structured supports repair. This gives structurally invalid or empty output one automatic
response without requiring each consumer to opt in. 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. Use a presence-aware public `RepairAttempts` field: omission selects the mode's
- How callers explicitly select zero attempts, including Go values where zero default; explicit zero disables repairs. Retain explicit budgets of two or three
may currently also represent omission. for eligible modes. Keep the existing rejection of positive budgets for `none`.
- How to communicate the possibility of an additional inference request, with Choose one rather than two as the default; consumers can opt into another
corresponding latency and usage, when repair is needed. 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 ## 2. Place Configuration Under A Root-Level `promptkit` Key