fix(providers): disable test/usage buttons for Copilot and Codex OAuth cards

These OAuth providers ship with non-empty ANTHROPIC_BASE_URL, so the
isOfficialProvider() heuristic (which checks for a missing base URL)
returned false and left the health-check and usage-config buttons
enabled — inconsistent with other official OAuth cards. Extend the
button disabling logic at the call site with isCopilot / isCodexOauth,
matching the pattern already used for the quota footer branch above.
This commit is contained in:
Jason
2026-04-07 21:51:04 +08:00
parent 641c2fc2c7
commit 34c6696baa
+6 -2
View File
@@ -417,10 +417,14 @@ export function ProviderCard({
onEdit={() => onEdit(provider)}
onDuplicate={() => onDuplicate(provider)}
onTest={
onTest && !isOfficial ? () => onTest(provider) : undefined
onTest && !isOfficial && !isCopilot && !isCodexOauth
? () => onTest(provider)
: undefined
}
onConfigureUsage={
isOfficial ? undefined : () => onConfigureUsage(provider)
isOfficial || isCopilot || isCodexOauth
? undefined
: () => onConfigureUsage(provider)
}
onDelete={() => onDelete(provider)}
onRemoveFromConfig={