From b662784087fdae71e5e33410c9994cc6dbeaa7cd Mon Sep 17 00:00:00 2001 From: ai-bot Date: Thu, 24 Sep 2026 19:20:20 +0000 Subject: [PATCH] Make API key regex pattern more flexible (support 16-128 chars with hyphens/underscores) --- startos/actions/configureApiKey.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/startos/actions/configureApiKey.ts b/startos/actions/configureApiKey.ts index bb24778..4336dfb 100644 --- a/startos/actions/configureApiKey.ts +++ b/startos/actions/configureApiKey.ts @@ -15,12 +15,10 @@ const inputSpec = InputSpec.of({ default: null, masked: true, placeholder: 'sk-...', - // Upstream's own shape check, applied here too — the Status Page rejects a - // malformed key outright, but a key written straight to config.json would - // only surface as a 401 on the first request. + // Allow standard PPQ keys and broader key lengths/characters (e.g. alphanumeric, underscores, hyphens) patterns: [ { - regex: '^sk-[A-Za-z0-9]{16,64}$', + regex: '^sk-[A-Za-z0-9_-]{16,128}$', description: i18n('A PPQ.AI key starts with "sk-".'), }, ],