Skip to content

fix: report no auth modes for credential-free TextTarget - #3777

Open
alexcastgonz (pcbeingused333) wants to merge 1 commit into
microsoft:mainfrom
pcbeingused333:fix-c1186
Open

alexcastgonz (pcbeingused333) wants to merge 1 commit into
microsoft:mainfrom
pcbeingused333:fix-c1186

Conversation

@pcbeingused333

Copy link
Copy Markdown
Contributor

Fixes #3712

Description

TextTarget writes prompts to a local text stream and never contacts a service, but it inherited the default supported_auth_modes of ("api_key",), so New Target described it as "Supported authentication: API key".

  • TextTarget declares supported_auth_modes = (), so the registry metadata and /targets/types say it takes no credentials.
  • CreateTargetDialog shows "No authentication required" when the registry metadata is loaded and a target reports an empty mode list. The built-in fallback entries (used when the registry is unavailable) also carry [], so they keep showing nothing rather than a claim the dialog can't back.

Tests and Documentation

  • tests/unit/registry/test_target_registry.py and tests/unit/backend/test_target_service.py assert the empty list for TextTarget (2 fail on main, pass with the change); the existing api-key-only assertion now uses GitHubCopilotTarget.
  • CreateTargetDialog.test.tsx: new test for the "No authentication required" text (fails on main); the target-list test gets the extra TextTarget entry.
  • No documentation change; JupyText not run (no notebook touched).

This change was prepared with an AI coding assistant (Claude Code) and submitted by Alex Castillo González.

TextTarget writes to a local stream and never contacts a service, but it
inherited the default supported_auth_modes of (api_key,), so the target
picker described it as 'Supported authentication: API key'. Declare an
empty tuple and have the dialog say 'No authentication required' when the
registry reports no auth modes.

This branch has not been deployed

No deployments
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.

TextTarget is described as using API-key authentication even though it needs no credentials

1 participant