SIGN IN SIGN UP

fix(zoo-gateway): stop inventing UI cost from default model prices (#1339)

* fix(zoo-gateway): stop inventing UI cost from default model prices

Stale in-memory model maps and defaultModelInfo $/token fallback made the panel overstate spend vs gateway billing after new catalog models (e.g. Alibaba promo).

* fix(zoo-gateway): negative-cache missing models and cover unset usage.cost

Avoid refetching the catalog on every request when an id is still absent after a fetch; retry after a short TTL. Add coverage for usage chunks that omit cost.

* fix(zoo-gateway): negative-cache empty catalog misses too

An empty getModels() result still records a missing-id attempt; the retry guard no longer requires a non-empty models map.

* fix(zoo-gateway): refresh catalog before negative-caching a miss

getModels can return a stale shared catalog for non-auth-scoped providers.
Force refreshModels when the selected id is still missing so newly listed
models are not blocked for the five-minute negative-cache window.

* fix(zoo-gateway): include refreshModels in RouterProvider test mocks

fetchModel now calls refreshModels on catalog misses; provider specs that
mocked only getModels broke under CI.
J
James Mtendamema committed
6ad8a6e581d7f881f90fd434927c99066f04d27b
Parent: 3dcac60
Committed by GitHub <noreply@github.com> on 8/22/2026, 4:07:33 AM