Commit Graph
1 Commits
Author SHA1 Message Date
yetone 3c279f66db qoder 0.2.49: a model the listing has off on a stale job token renews it once and reads the list again (#484)
On an enterprise qoder.com account under 0.2.48, 12 of the 14 app models
(ultimate, fast, efficient, smodel, cmodel, qmodel_38max, gmodel,
gfmodel, kmodel_latest, kmodel, dmodel, mmodel) were answered with the
plugin's own 400 "unknown or disabled model" while dfmodel and qfmodel,
the two free ones, were served. That 400 is said from the account's
listing before any chat is sent, so the renewal 0.2.48 gave a refused
chat (#474) never ran for those models.

ask() now does what it does for a refused chat when a model Qoder serves
(the site's shipped list, or any key a listing has named, on or off) is
off or missing in the listing: relogin once (the pair saved since, else
one refresh under the lock, not again within RELOGIN_GAP) and read the
list again before the 400. An id Qoder never served gets the 400 at once
with no renewal.

Not proven: why the reporter's listing had only the free models on. The
listing and lookup code is the same in 0.2.47 and 0.2.48; the fake here
models a job token Qoder no longer honours in full getting the free view.
There is no enterprise account here to reproduce it on.

Run (mote-run, Bun 1.4.2):
- listing-renew.test.mjs against cc3f000c's index.mjs (0.2.48): 3 of 5
  red (the reporter's 14 ids get 400; the renewal isn't said).
- the same file with this change: 5 of 5 pass.
- bun test packages/qoder at this head: 325 pass, 0 fail (320 before,
  lapsed.test.mjs and usage.test.mjs from #474 still green).
- bun scripts/check.mjs qoder: ok.
2026-10-29 20:05:46 +08:00