From 34c6696baac56bdc9fbb463e19e4c71df00dece7 Mon Sep 17 00:00:00 2001 From: Jason Date: Tue, 7 Apr 2026 21:51:04 +0800 Subject: [PATCH] fix(providers): disable test/usage buttons for Copilot and Codex OAuth cards MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- src/components/providers/ProviderCard.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/providers/ProviderCard.tsx b/src/components/providers/ProviderCard.tsx index 24166b00f..a79a799a5 100644 --- a/src/components/providers/ProviderCard.tsx +++ b/src/components/providers/ProviderCard.tsx @@ -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={