Skip to content

fix(pi): accept equal legacy output cap - #174

Merged
drewstone merged 1 commit into
mainfrom
fix/pi-equal-legacy-max-tokens-20260816
Aug 16, 2026
Merged

fix(pi): accept equal legacy output cap#174
drewstone merged 1 commit into
mainfrom
fix/pi-equal-legacy-max-tokens-20260816

Conversation

@drewstone

Copy link
Copy Markdown
Owner

Problem

Runtime emits maxTotalOutputTokens as the authority, while older generated profiles can retain the same value as metadata.maxTokens. Pi rejected that equal pair before child execution.

Change

Accept metadata.maxTokens only when it is the sole metadata key and exactly equals maxTotalOutputTokens. Reject old-only, conflicting, empty, extra, hidden, and symbol keys before session persistence. The canonical field remains the only applied cap.

Proof

  • pnpm typecheck
  • focused Pi tests: 90 passed, 1 skipped
  • full suite: 970 passed, 12 skipped
  • independent adversarial review: no P0/P1 blockers
  • pre-commit and pre-push checks passed

@drewstone
drewstone merged commit d21273e into main Aug 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant