Skip to content

OAuth Providers not selectable - #881

Open
fathah wants to merge 1 commit into
mainfrom
oauth-providers-not-loaded
Open

OAuth Providers not selectable#881
fathah wants to merge 1 commit into
mainfrom
oauth-providers-not-loaded

Conversation

@fathah

@fathah fathah commented Jul 29, 2026

Copy link
Copy Markdown
Owner

No description provided.

const [all, customs, oauthStatuses] = await Promise.all([
window.hermesAPI.listModels() as Promise<LibModel[]>,
window.hermesAPI.listCustomProviders(profile).catch(() => []),
window.hermesAPI.getOAuthProviderStatuses(profile),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 OAuth status uses local runtime

When the model picker runs in remote or SSH mode, getOAuthProviderStatuses still reads the local profile's auth.json, causing remotely authenticated providers to be omitted and locally authenticated providers unavailable to the active runtime to be offered.

Knowledge Base Used:

@greptile-apps

greptile-apps Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds OAuth-authenticated providers to the active-model picker without exposing tokens to the renderer.

  • Introduces a boolean OAuth credential-status IPC and preload API.
  • Merges authenticated OAuth plans with keyed and custom picker providers.
  • Adds picker and preload-surface regression tests and updates provider setup documentation.

Confidence Score: 3/5

The remote and SSH credential-source mismatch needs to be fixed before merging because the picker can omit usable OAuth providers or offer providers unavailable to the active runtime.

The new picker status API always inspects local auth.json, while the model library and subsequent execution can target a remote or SSH runtime with different provider credentials.

Files Needing Attention: src/main/ipc/register.ts, src/renderer/src/screens/Providers/Providers.tsx

Important Files Changed

Filename Overview
src/main/ipc/register.ts Adds the OAuth status handler, but it reads local credentials without following the connection-mode dispatch used by model-library operations.
src/renderer/src/screens/Providers/Providers.tsx Incorporates OAuth status into the picker, causing remote and SSH pickers to rely on credential state from the wrong runtime.
src/renderer/src/screens/Providers/provider-picker.ts Cleanly converts authenticated OAuth status entries into deduplicated picker providers.
src/preload/index.ts Exposes the new status IPC through the context-isolated preload bridge with a matching return type.
src/preload/index.d.ts Adds the corresponding typed HermesAPI declaration.
tests/provider-picker.test.ts Covers inclusion, saved-model association, and deduplication, but not connection-mode credential ownership.

Sequence Diagram

sequenceDiagram
  participant U as User
  participant R as Providers renderer
  participant P as Preload bridge
  participant M as Main process
  participant A as Local auth.json
  U->>R: Open model picker
  R->>P: listModels()
  P->>M: Connection-aware model lookup
  M-->>R: Local, remote, or SSH models
  R->>P: getOAuthProviderStatuses(profile)
  P->>M: get-oauth-provider-statuses
  M->>A: hasOAuthCredentials()
  A-->>M: Local credential booleans
  M-->>R: OAuth statuses
  R->>R: Build selectable providers
Loading

Reviews (1): Last reviewed commit: "OAuth Providers not selectable" | Re-trigger Greptile

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.

1 participant