OAuth Providers not selectable - #881
Conversation
| const [all, customs, oauthStatuses] = await Promise.all([ | ||
| window.hermesAPI.listModels() as Promise<LibModel[]>, | ||
| window.hermesAPI.listCustomProviders(profile).catch(() => []), | ||
| window.hermesAPI.getOAuthProviderStatuses(profile), |
There was a problem hiding this comment.
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 SummaryAdds OAuth-authenticated providers to the active-model picker without exposing tokens to the renderer.
Confidence Score: 3/5The 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
|
| 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
Reviews (1): Last reviewed commit: "OAuth Providers not selectable" | Re-trigger Greptile
No description provided.