• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

lsm / neokai / 27729217056

18 Jun 2026 12:45AM UTC coverage: 70.024% (-11.7%) from 81.696%
27729217056

push

github

web-flow
fix(providers): make test connection actually verify API credentials (#2117)

* fix(providers): make test connection actually verify API credentials

Kimi, GLM, MiniMax, Codex, ACP, and Custom Endpoint providers reported
"healthy" in providers.test/providers.healthCheck without ever calling
the upstream API — getModels() returned a hardcoded static list after a
sync credential-presence check. A key that was present but invalid
(authRevoked, wrong env, expired token) showed up as healthy until the
first real session request failed.

Each provider's getModels() now probes the upstream using the resolved
credentials before returning the static catalogue. Probes are
lightweight (max_tokens=1 messages request, /models listing, or a
binary spawn for ACP), 5s-bounded, and cached per credential for 30s so
repeated health checks and the model picker don't re-probe within the
window. Failed probes throw so the existing RPC handler maps them to
healthStatus='unhealthy' with the upstream's error message.

- shared/credential-probe.ts: minimal Anthropic-compat probe helper
- kimi-provider.ts: probe api.kimi.com/coding/v1/messages
- glm-provider.ts: probe open.bigmodel.cn/api/anthropic/v1/messages
- minimax-provider.ts: probe api.minimax.io/anthropic/v1/messages
- custom-endpoint-provider.ts: GET probe aligned with the UI
  (testCustomEndpoint) — /api/tags, /v1/models, or /models by type
- acp-provider.ts: spawnSync the configured NEOKAI_ACP_COMMAND with
  --help; ENOENT, timeout, and other spawn failures map to unhealthy
- anthropic-to-codex-bridge-provider.ts: POST /responses to either
  api.openai.com/v1 (API key) or chatgpt.com/backend-api/codex (OAuth)

Also clears KIMI_API_KEY, MOONSHOT_API_KEY, and NEOKAI_ACP_COMMAND in
the unit test preload so provider probes triggered by model-service's
loadModelsFromProviders() don't hit real upstreams during the
empty-cache fallback tests.

* fix(providers): address review feedback on credential probes

P0: Codex chatgpt... (continued)

10716 of 15625 branches covered (68.58%)

Branch coverage included in aggregate %.

286 of 320 new or added lines in 10 files covered. (89.38%)

15467 existing lines in 116 files now uncovered.

78336 of 111549 relevant lines covered (70.23%)

228.15 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

23.94
/packages/daemon/src/lib/github/webhook-handler.ts


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc