fix(desktop): stop validating provider keys in launch setup

The launch provider setup screen rejected too many legitimate users:
a live credential probe ("key rejected"), a post-save runtime check
("still cannot reach X"), and an 8-char minimum all gated progression.
Corporate proxies, regional blocks, rate-limited/flaky probes, and
self-hosted endpoints all tripped these. Now we just require a
non-empty value and save it; a genuinely bad key surfaces later at
chat time instead of blocking onboarding.
This commit is contained in:
Brooklyn Nicholson
2026-06-03 18:39:00 -05:00
parent 1927ff217e
commit 7ea37cd082
2 changed files with 17 additions and 35 deletions
@@ -56,8 +56,6 @@ interface ApiKeyOption {
short?: string
}
const MIN_KEY_LENGTH = 8
const API_KEY_OPTIONS: ApiKeyOption[] = [
{
id: 'openrouter',
@@ -418,7 +416,9 @@ function ApiKeyForm({ canGoBack, ctx }: { canGoBack: boolean; ctx: OnboardingCon
const [error, setError] = useState<null | string>(null)
const isLocal = option.envKey === 'OPENAI_BASE_URL'
const canSave = value.trim().length >= (isLocal ? 1 : MIN_KEY_LENGTH)
// Only require a non-empty value — no length/format validation, so a short
// or unusual key can't block the user from continuing.
const canSave = value.trim().length >= 1
const submit = async () => {
if (!canSave || saving) {