9router/src/lib
Simon Shi 620b59ca0b fix(qoder): address review findings
Correctness:
- testUtils: drop checkExpiry so the userinfo URL probe actually runs (revoked
  tokens used to look "active" until local 30-day expiry passed)
- auth.parseExpiry: handle numeric expiresAt, swap parseInt before Date.parse
  so "2026" doesn't get interpreted as year-2026, treat expires_in:0 as
  already-expired instead of fabricating a 30-day default
- providers.mapTokens: synthesize email from userId when fetchUserInfo fails
  so OAuth dedup works (re-logins no longer accumulate "Account N" rows)

SSE wrapper:
- wrapQoderSSE: add !doneEmitted guard on success branch (chunks could leak
  past [DONE] when an error envelope shared a TCP packet with a valid one)
- flush(): finalize TextDecoder + drain trailing buffer so the chunk carrying
  finish_reason is delivered when upstream closes without a final \n
- sanitize literal \n inside inner OpenAI body so SSE framing stays intact

Robustness:
- executor: wrap buildCosyHeaders in try/catch so a missing accessToken
  returns 401 (re-auth) instead of bubbling as 500
- executor: short-circuit on missing accessToken before signing
- executor: plumb proxyOptions/signal through buildQoderRequestBody so
  proxy-only networks can fetch the model_config catalog
- qoderModels: dedupe concurrent first-time misses with an in-flight Promise
  map (parallel chat windows now do 1 upstream fetch instead of N)
- qoderModels: check signal.aborted before addEventListener so a pre-aborted
  parent signal cancels the inner fetch immediately
- auth: AbortController + 15s timeout on pollDeviceToken / fetchUserInfo to
  prevent hung sockets when openapi.qoder.sh stalls mid-response

UX:
- OAuthModal: derive polling deadline from device-code expires_in (qoder
  publishes 300s; the previous fixed 120s caused timeouts when users took
  more than 2 minutes on the consent page)

Cleanup:
- delete src/lib/oauth/services/qoder.js — referenced removed config fields
  (clientId/clientSecret/tokenUrl/authorizeUrl) and was re-exported from
  services/index.js, so any future caller would TypeError on first use
2026-05-29 17:36:27 +07:00
..
auth Enhance security 2026-05-21 11:33:18 +07:00
db Squashed commit of the following: 2026-05-21 11:33:18 +07:00
mcp Fix bug 2026-05-13 20:35:42 +07:00
network feat(proxy-pools): add support for deno deploy relays and fix layout overflow issues in proxy pools dashboard (#1437) 2026-05-26 11:21:49 +07:00
oauth fix(qoder): address review findings 2026-05-29 17:36:27 +07:00
qoder fix(qoder): address review findings 2026-05-29 17:36:27 +07:00
tunnel Added new models for Claude Opus 4.8 and GPT 5.4 Mini. 2026-05-29 17:36:27 +07:00
updater chore: release v0.4.27 2026-05-09 22:48:07 +07:00
usage feat(executors): Improved UI components for displaying provider limits and usage statistics in the dashboard. 2026-02-05 18:38:50 +07:00
appUpdater.js # v0.4.29 (2026-05-10) 2026-05-10 21:56:40 +07:00
consoleLogBuffer.js Feat : console log 2026-03-02 09:31:16 +07:00
dataDir.js fix: handle permission denied when creating DATA_DIR (#1005) 2026-05-12 09:35:49 +07:00
disabledModelsDb.js feat(db): migrate from lowdb to SQLite with repos pattern 2026-05-09 17:48:20 +07:00
localDb.js feat(db): migrate from lowdb to SQLite with repos pattern 2026-05-09 17:48:20 +07:00
mitmAliasCache.js # v0.4.29 (2026-05-10) 2026-05-10 21:56:40 +07:00
providerNormalization.js feat(xai): add xAI Grok provider with OAuth + API key auth + image 2026-05-21 11:33:18 +07:00
requestDetailsDb.js feat(db): migrate from lowdb to SQLite with repos pattern 2026-05-09 17:48:20 +07:00
usageDb.js feat(db): migrate from lowdb to SQLite with repos pattern 2026-05-09 17:48:20 +07:00