release: 0.2.0 — custom models, gateway context caps, free daily keys

- Custom models: add a model by id (protocol, reasoning, images, context
  window, max output) next to the built-in catalog.
- Gateway context caps: read per-model context_window from each key's
  /v1/models and narrow the catalog model to the tightest window (free
  DeepSeek group: 200K, 32K output) so DSH compacts before the cap.
- Free daily keys: show each key's expiry, flag the renewal window and
  link to https://www.geek2api.com/free-ds; the no-usable-key error points
  there too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
大阔andClaude Opus 5.5 committed 2026-11-16 21:44:12 +08:00
1 parent 93a5fe93b4
commit a8f689e39c
21 files changed
+2161 -427

No files matched your search

+6
View File
@@ -1,5 +1,11 @@
# Changelog
## 0.2.0
- **Gateway context caps (free DeepSeek group).** When a key's group limits the input per request, Geek2API now reports `context_window` in that key's `/v1/models` (the free DeepSeek group allows 200K although DeepSeek V4.1 Flash itself takes 1M). The catalog model is narrowed to the tightest window reported by the keys that reach it — DeepSeek V4.1 Flash becomes 200K with 32K max output — so DSH compacts the session at about 100K instead of being refused at 200K. Keys whose groups report no cap leave the model unchanged. If a request still overflows, the gateway's error now uses the standard `context_length_exceeded` / `maximum context length` wording, which DSH recognizes and answers by compacting and retrying.
- **Free daily keys.** The free DeepSeek group only accepts the daily key claimed at https://www.geek2api.com/free-ds; each lasts 24 hours and the next one can be claimed 2 hours before expiry (both stay valid). Settings → Geek2API shows each key's expiry, flags a daily key whose renewal window is open or that has expired, and links to the page that issues the next one. The "no usable key" error points there too. A per-request context cap is shown under the key.
- **Custom models.** Settings → Geek2API → Visible models → Custom models adds a model by id next to the built-in catalog: its protocol (Chat Completions, Responses, or Messages), whether it reasons (off / low / medium / high), whether it takes images, and optionally its context window and max output (default 128000 / 32000). It is served by the same route — same keys, endpoints, failover, and key rotation — and appears in the picker at once without restarting. Each key's `/v1/models` coverage includes the custom models (a "Custom" column under the key), so a request for one runs on a key that reaches it. Ids must not repeat a built-in id; at most 32. The list is the volatile `customModels` preference; a hand-edited entry that cannot be served is dropped instead of failing the route. Removing a custom model leaves sessions that used it with an unknown model, never another model. The built-in catalog is unchanged.
## 0.1.4
- Releases are now published to npm automatically from the release workflow through npm trusted publishing (OIDC): the same tarball as the GitHub Release and the Geek2API mirror, with no stored npm token. No plugin behavior changes.