test: address round-5 review findings

- provider fetchModels: pin that an empty live list keeps the last good
  list instead of the baseline.
- tokenRequest: pin the OAuth error mapping (error -> code,
  error_description -> message, body excerpt when absent).
- overlap test: give the session a Nous model so the setModel half of the
  supersede guard is asserted (exactly one switch, by the winner).
- README: drop the hard-coded live catalog counts (409 / 3 / 42); they
  are a 2026-11-25 snapshot that drifts silently. /model shows the live list.

No production-code change. Tests: 20 (was 18).
This commit is contained in:
AlexKucera committed 2026-11-25 11:00:37 +01:00
1 parent 78e89241a6
commit 04fa08f0b7
2 files changed
+28 -10

No files matched your search

+6 -6
View File
@@ -23,7 +23,7 @@ Then in pi:
- `/login nous-portal` offers two methods: **Sign in to Nous Portal (subscription)** for the device-code OAuth flow, or **Nous Portal API key** to store an `sk-nous-…` key.
- The API-key route also reads `$NOUS_API_KEY`.
- `/model` lists the live catalog (409 models) in interactive sessions.
- `/model` lists the live catalog in interactive sessions.
### Catalog filters
@@ -32,11 +32,11 @@ Then in pi:
/nous-free jump to free models (again returns to full)
```
| Catalog | Live signal | Models |
|---|---|---|
| full | every chat model except Hermes-branded ids (none in the catalog as of 2026-11-25) | 409 |
| free | `synthesizedFreeVariant`, also suffixed `:free` | 3 |
| promo | `pricing.original` above the current price | 42 |
| Catalog | Live signal |
|---|---|
| full | every chat model except Hermes-branded ids (none in the catalog as of 2026-11-25) |
| free | `synthesizedFreeVariant`, also suffixed `:free` |
| promo | `pricing.original` above the current price |
The choice is saved in `~/.pi/agent/nous-portal-catalog` and survives restarts.