desktop: Providers settings shows "API key" badge for OAuth (account) connections

Open Beginner friendly
#50,176 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
74/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
desktop, frontend

Research direction

Start in OpenCode Desktop's Providers settings where the credential badge is rendered, and trace the credential type from the server data. Reproduce the issue with an OAuth-connected OpenAI provider and a key-based provider; done means OAuth shows “Account (OAuth)” while key-based credentials still show “API key”.

Written by the indexing model from the issue text.

Description

Summary

In OpenCode Desktop's Providers settings, connected providers show a generic "API key" badge even when they were connected via OAuth with an account (e.g. OpenAI). The badge does not reflect the actual credential type stored by the server.

Environment

  • opencode version: Desktop 2.0.11 (bundled CLI v2.0.11)
  • OS: macOS, Darwin 27.0.0, arm64 (Apple Silicon M1)
  • Terminal: N/A (Desktop app)
  • Shell: /bin/bash
  • Install/channel: stable
  • Active plugins: none

Reproduction

  1. Connect the OpenAI provider with an OpenAI account (OAuth flow) in the Desktop app
  2. Open Settings > Providers
  3. The OpenAI entry shows the "API key" badge

Expected Behavior

The badge should reflect the actual connection method, e.g. "Account (OAuth)" for OAuth credentials and "API key" for key-based credentials.

Actual Behavior

The UI shows the "API key" badge for the OAuth-connected OpenAI provider.

Additional Context

Server-side the credential is correctly typed as OAuth:

  • Server log records credential created ... integrationID=openai type=oauth (the same session also shows integrationID=openrouter type=key, whose "API key" badge is correct)
  • The credential store contains an OAuth JSON payload with access token, refresh token and expiry

So the stored data is right and the label is a UI-only issue, consistent with the display problems reported in #41720.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
Avg merge
7h 20m
Merged PRs (30d)
358

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from anomalyco/opencode

All issues in anomalyco/opencode

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.