Skip to content

fix(models): make unpriced guidance actionable - #996

Merged
iamtoruk merged 5 commits into
getagentseal:mainfrom
avs-io:codex/issue-969-unpriced-reconcile
Aug 18, 2026
Merged

iamtoruk merged 5 commits into
getagentseal:mainfrom
avs-io:codex/issue-969-unpriced-reconcile

Conversation

@avs-io

@avs-io avs-io commented Aug 13, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

The dashboard's unpriced-model warning is truncated in narrow terminals and its suggested command cannot be copied from the alternate-screen TUI. Users cannot reliably identify every affected raw model ID or run the remediation.

Root cause

The dashboard tried to fit model details and a fix hint inside a fixed-width panel. The plain models report had no dedicated unpriced filter, and applying normal --top or minimum-cost behavior before identifying unpriced rows could hide the rows users needed.

Change

  • Add codeburn models --unpriced as a copyable plain-output path.
  • Filter unpriced rows before applying --top, while preserving an explicit --min-cost threshold.
  • Preserve exact raw model IDs in JSON and sanitize provider-supplied IDs in human-readable formats.
  • Use deterministic, locale-independent ordering.
  • Render the complete command at narrow dashboard widths, including real 42–44 column layouts.
  • Document the new command.

This branch preserves the original contribution and authorship from #985, then adds the dashboard, safety, ordering, and narrow-terminal completion needed to close the issue.

User impact

Users can copy every unpriced model ID from normal terminal output and the dashboard always points to a complete runnable command, even in narrow terminals.

Preservation and out of scope

  • Existing models output and its one-cent default remain unchanged without --unpriced.
  • Explicit --min-cost and --top options remain authoritative.
  • JSON remains lossless for automation.
  • No pricing or spend is invented or changed.

Testing

  • Focused model, dashboard, overview, and CLI suites: 272 passed.
  • Full root suite: 2,627 passed, 5 skipped.
  • Serial lock suite: 26 passed.
  • Desktop suite: 468 passed.
  • Root, dashboard, and desktop typechecks passed.
  • CLI, dashboard, and desktop builds passed.
  • Built CLI exercised with priced, unpriced, and hostile raw IDs in an isolated home.
  • Real controlling-PTY dashboard checks passed at 42, 43, 44, and 80 columns with clean terminal teardown.
  • Rebuilt Electron app was launched and clicked through against the isolated fixture with no real user data.

Fixes #969.

@avs-io
avs-io force-pushed the codex/issue-969-unpriced-reconcile branch from 3d6d180 to 02ddc3c Compare August 13, 2026 22:35
@avs-io avs-io changed the title fix(cli): complete unpriced model guidance and dashboard command fix(models): make unpriced guidance actionable Aug 13, 2026
Keep both: #985's --unpriced filter (in main) and #996's top/ordering/sanitize/dashboard changes.
Resolve src/main.ts to main's #1016 rank-map --unpriced/--top implementation and
drop this branch's inline comparator and topN hunk entirely.
… narrow warning

The unpriced-models pointer told every user to run `codeburn model-alias`. A
subscription or flat-rate model is correctly $0, and mapping it onto another
model's per-token rate invents spend that was never billed (#968), so the hint
now states the condition instead of the instruction.

`sanitizeModelForDisplay` guarded only the `--unpriced` path, leaving every
other command and format rendering provider-supplied IDs unfiltered. It moves
to the `formatModel` closures in models-report and audit-report, the two sites
every renderer routes through, covering the raw-ID fallback as well. The
`--unpriced` override stays: it bypasses that path deliberately, because
`model-alias` keys on the raw ID, not the friendly name. README says so.

Below 45 columns of panel the dashboard warning dropped its marker and count
and printed a bare command, so a narrow terminal gave no signal that anything
was wrong. `! N: codeburn models --unpriced` is 31 characters and fits.
@iamtoruk
iamtoruk marked this pull request as ready for review August 18, 2026 17:00
@iamtoruk
iamtoruk merged commit 1808d36 into getagentseal:main Aug 18, 2026
9 checks 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.

Unpriced-models warning is truncated at every terminal width, hiding both the model list and the fix command

3 participants