fix: numeric input + non-negative for per-config pricing fields #62
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/admin-form-numeric-pricing"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Per-config input_per_mtok / output_per_mtok inputs were type=text
with placeholder examples, parsed via strconv.ParseFloat with the
error silently discarded. Locale-y input like "3,00" or a typo would
just blank the field with no feedback to the operator.
Switch the two pricing fields (in both the create and edit forms)
to type=number step=0.0001 min=0, which lets the browser reject
non-numeric input and negative values before submit. Server-side
ParseFloat failures still log a Warn line — same semantics as
before, just no longer mute, in case a non-browser client posts
malformed data.
Temperature stays type=text since it has its own existing range
copy and isn't part of the spend rollup; revisit separately if
desired.
Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com
Automated review by pr-reviewer v0.28.0 | Safety Check | Claude Sonnet 4 | tracking id
r-f9ac62-5fe0eeThis is an AI-genrated review and may contain mistakes.
Status: ⏳ Pending
Running a quick safety check on this PR using
Claude Sonnet 4. This is just a sanity check — for a full review, assign me as a reviewer or comment@pr-reviewer-bot review.5055b01d1e33e6ce4aa4