[PR #12093] feat(cli): support provider slugs in auth login positional argument #14061

Open
opened 2026-02-16 18:18:52 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/12093

State: open
Merged: No


Summary

  • opencode auth login github-copilot would fail with fetch(): URL is invalid because the positional arg was always treated as a well-known URL.
  • Now, if the arg does not start with http:// or https://, it is treated as a provider slug and follows the same plugin auth / API key code path used by the interactive picker. URLs still go through the well-known discovery flow.
  • Also fixes a type error (string | symbol not assignable to string) in the "other" provider text prompt by using a temporary variable with a cancel check before assignment.
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/12093 **State:** open **Merged:** No --- ## Summary - `opencode auth login github-copilot` would fail with `fetch(): URL is invalid` because the positional arg was always treated as a well-known URL. - Now, if the arg does not start with `http://` or `https://`, it is treated as a provider slug and follows the same plugin auth / API key code path used by the interactive picker. URLs still go through the well-known discovery flow. - Also fixes a type error (`string | symbol` not assignable to `string`) in the "other" provider text prompt by using a temporary variable with a cancel check before assignment.
yindo added the pull-request label 2026-02-16 18:18:52 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#14061