fix(health-check): disable connectivity check for official providers, restore 6s degraded threshold

Official providers (Claude/Codex/Gemini/Claude Desktop) use OAuth with an intentionally empty base_url and connect via the client's default endpoint, so cc-switch has no reliable reachability target. Probing a guessed endpoint either hits the wrong target or returns a meaningless green light. Hide the connectivity button for category === 'official'; reachability stays available for copilot/codex-oauth/third-party/custom providers, which is where the old real-request probe produced false negatives. Revert the official base_url fallback added earlier — resolve_base_url is back to extract-or-error.

The 1500ms degraded threshold was too strict; normal ~1s probe latencies showed as 'slow'. Restore the original 6000ms scale (default + config panel + per-provider range). Keep the reachability-appropriate 8s timeout / 1 retry.
This commit is contained in:
Jason
2026-06-14 15:55:18 +08:00
parent a5903d8600
commit fee354d09e
4 changed files with 36 additions and 130 deletions
@@ -144,7 +144,7 @@ export function ProviderAdvancedConfig({
id="degraded-threshold"
type="number"
min={100}
max={10000}
max={60000}
value={testConfig.degradedThresholdMs || ""}
onChange={(e) =>
onTestConfigChange({
@@ -154,7 +154,7 @@ export function ProviderAdvancedConfig({
: undefined,
})
}
placeholder="1500"
placeholder="6000"
disabled={!testConfig.enabled}
/>
</div>