Skip to content

fix: Guard provider verification when the provider is disabled#1599

Merged
zerob13 merged 3 commits intodevfrom
copilot/fix-verification-key-issue
May 9, 2026
Merged

fix: Guard provider verification when the provider is disabled#1599
zerob13 merged 3 commits intodevfrom
copilot/fix-verification-key-issue

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 9, 2026

The settings page allowed users to run provider/model verification even when the provider itself was disabled. That path surfaced a misleading Provider not initialized error although the provider could still work once enabled.

  • What changed

    • Disabled verification entry points when provider.enable === false.
    • Added no-op guards to verification handlers so disabled providers do not open the model-check dialog or trigger inline credential checks.
    • Covered both the shared provider settings flow and provider-specific verification paths.
  • UI / behavior

    • Shared provider verify button is now disabled for disabled providers.
    • Pressing Enter in the API key field no longer triggers verification for a disabled provider.
    • Provider-specific verify actions (Ollama, GitHub Copilot, Bedrock, Vertex) now respect the same enabled-state guard.
  • Regression coverage

    • Added focused renderer coverage for the shared ProviderApiConfig verification flow:
      • disabled provider => verify button disabled
      • disabled provider => API key enter shortcut does not emit validation
  • Relevant implementation

    const canVerifyProvider = computed(() => props.provider.enable)
    
    const openModelCheckDialog = () => {
      if (!canVerifyProvider.value) {
        return
      }
    
      modelCheckStore.openDialog(props.provider.id)
    }
  • Docs

    • Added a small SDD issue folder documenting the bug, scope, and task breakdown under:
      • docs/issues/provider-validation-disabled/

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • cdn.sheetjs.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/_temp/ghcca-node/node/bin/pnpm install (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI linked an issue May 9, 2026 that may be closed by this pull request
Copilot AI and others added 2 commits May 9, 2026 10:50
Copilot AI changed the title [WIP] Fix verification key prompt issue Guard provider verification when the provider is disabled May 9, 2026
Copilot AI requested a review from zhangmo8 May 9, 2026 10:52
@zhangmo8 zhangmo8 marked this pull request as ready for review May 9, 2026 10:59
@zerob13 zerob13 changed the title Guard provider verification when the provider is disabled fix: Guard provider verification when the provider is disabled May 9, 2026
@zerob13 zerob13 merged commit 51eebb4 into dev May 9, 2026
3 checks passed
@zhangmo8 zhangmo8 deleted the copilot/fix-verification-key-issue branch May 9, 2026 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] 验证密钥提示问题

3 participants