diff options
| author | Danilo M. <danix@danix.xyz> | 2026-08-09 16:38:44 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-08-09 16:38:44 +0200 |
| commit | 46866c570c719ed02c8b43d688a2725bdcf5011c (patch) | |
| tree | a018cf306f396de7098573ebd449e44b622775a7 /initial-prompt.md | |
| parent | 5ffbe947736684df2b7a8dd1d647e16c080b0b1d (diff) | |
| download | llamachat-46866c570c719ed02c8b43d688a2725bdcf5011c.tar.gz llamachat-46866c570c719ed02c8b43d688a2725bdcf5011c.zip | |
fix: reject non-finite provider prices, and read them as unpriced
A nan or inf in [providers.*] survived float() and reached the cost
arithmetic, rendering $nan or, for -inf, a negative cost. Worse than a
display wart: is_priced answered True, so the readout took the priced
branch and showed a poisoned figure in the one state the ? is there to
admit it cannot say.
Guarded at both ends. providers._number mirrors models._get, which
already covered the models.ini writer. is_priced states its own
predicate completely rather than trusting its callers, since the dialog
is a third writer and the file is documented for hand-editing.
Records why float money stays, and that exact-equality assertions in the
cost test hold for the chosen prices rather than in general.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'initial-prompt.md')
0 files changed, 0 insertions, 0 deletions
