Files
routstr-core/routstr
Jeroen UbbinkandClaude Opus 5 59bf8f4c90 fix(admin): a rate given as null is not an absent rate
The write edge read each rate through `dict.get`, which returns `None` for an
absent key and for an explicit `null` alike, and skipped both. `Pricing`
declares `prompt` and `completion` without a default and every rate as a float,
so neither is a row the read path can parse: the write was accepted, the row
committed, and the response that reads it back raised — a 500 for a request
the edge had already acted on, leaving a model that cannot be served.

Ask whether the key is there, then whether its value is a rate. Which rates are
required is derived from `Pricing` itself rather than restated, so the two
cannot drift; an omitted auxiliary rate is still accepted, since those have
defaults.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014X8RZzzbAuQCbavhFjTvJ4
2026-08-26 15:54:49 +02:00
..
2026-08-23 11:06:06 +02:00
2026-08-15 15:09:00 +02:00