Skip to content

fix(settings): allow model-level test connection without client-side API key#309

Open
cosarah wants to merge 2 commits intomainfrom
fix/model-test-connection
Open

fix(settings): allow model-level test connection without client-side API key#309
cosarah wants to merge 2 commits intomainfrom
fix/model-test-connection

Conversation

@cosarah
Copy link
Copy Markdown
Collaborator

@cosarah cosarah commented Mar 27, 2026

Summary

  • Remove the client-side !apiKey guard in model-edit-dialog.tsx handleTestModel so that model-level "Test Connection" delegates API key resolution to the server, matching provider-level behavior. Previously, if no client-side API key was entered, the test would immediately fail with "API Key is required" even when a valid server-side key was configured.
  • Fix broken i18n keys (common.save, common.cancel) in image and video model dialogs — replaced with existing settings.saveModel and settings.cancelEdit keys.

Closes #308

Test plan

  • Configure an API key only on the server side (e.g. env var), leave the client-side API key field empty
  • Provider-level "Test Connection" should succeed
  • Open a specific model → "Test Connection" should now also succeed (previously showed "API Key is required")
  • Verify image/video model dialog Save/Cancel buttons display correctly translated text

🤖 Generated with Claude Code

…API key and fix i18n keys

Remove the client-side apiKey guard in model edit dialog so test connection
delegates to the server (matching provider-level behavior). Also replace
non-existent common.save/common.cancel i18n keys with settings.saveModel/
settings.cancelEdit in image and video model dialogs.

Closes #308

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@cosarah cosarah marked this pull request as draft March 27, 2026 05:28
…ilable

Match provider-level behavior: disable the test connection button in the
model edit dialog when requiresApiKey && !apiKey && !isServerConfigured.
@cosarah cosarah marked this pull request as ready for review March 27, 2026 05:39
@cosarah cosarah requested a review from wyuc March 27, 2026 05:39
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]: Model-level test connection fails with 'API key required' when only server-side key is configured

1 participant