fix: omit customUserAgent when provider category is official

Stale custom UA values from non-official presets were persisted even
after switching to an official preset, silently altering request headers.
This commit is contained in:
RoromoriYuzu
2026-04-27 22:21:51 +08:00
committed by Jason
Unverified
parent ff706e9e96
commit 25983f3420
@@ -1391,7 +1391,7 @@ function ProviderFormFull({
? normalizeCodexChatReasoningForSave(codexChatReasoning)
: undefined,
customUserAgent:
appId === "claude" || appId === "codex"
(appId === "claude" || appId === "codex") && category !== "official"
? customUserAgent.trim() || undefined
: undefined,
testConfig: testConfig.enabled ? testConfig : undefined,