Skip to content

fix: models not shown in "Choose Model" modal after OAuth configuration completes#7891

Merged
DOsinga merged 1 commit into
aaif-goose:mainfrom
sheikhlimon:fix/oauth-refresh
Mar 26, 2026
Merged

fix: models not shown in "Choose Model" modal after OAuth configuration completes#7891
DOsinga merged 1 commit into
aaif-goose:mainfrom
sheikhlimon:fix/oauth-refresh

Conversation

@sheikhlimon
Copy link
Copy Markdown
Contributor

Summary

After completing OAuth configuration for ChatGPT Codex, the "Choose Model" modal opened automatically but didn't show ChatGPT Codex models. The provider list hadn't been refreshed yet, so the newly configured provider wasn't included.

Root Cause

In ProviderGrid.tsx, the onProviderConfigured callback called refreshProviders() but didn't await it before opening the model selector modal. The provider list fetch was still in progress when the modal rendered.

Fix

Make onProviderConfigured async and await refreshProviders() before setting the model provider state and opening the modal.

Testing

  1. Configure ChatGPT Codex via OAuth
  2. After browser authorization and returning to app
  3. "Choose Model" modal now opens with ChatGPT Codex models available for selection

Type of Change

  • Feature
  • Bug fix
  • Refactor / Code quality
  • Performance improvement
  • Documentation
  • Tests
  • Security fix
  • Build / Release
  • Other (specify below)

AI Assistance

  • This PR was created or reviewed with AI assistance

Screenshots/Demos (for UX changes)

Before:
screenshot-2026-03-14_14-26-51

After:
screenshot-2026-03-14_14-25-38

Signed-off-by: sheikhlimon <sheikhlimon404@gmail.com>
Copy link
Copy Markdown
Collaborator

@DOsinga DOsinga left a comment

Choose a reason for hiding this comment

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

Clean fix for a real race condition — awaiting refreshProviders() before opening the modal is exactly right. Approved.

@DOsinga DOsinga added this pull request to the merge queue Mar 26, 2026
Merged via the queue into aaif-goose:main with commit 3c73396 Mar 26, 2026
19 checks passed
@sheikhlimon sheikhlimon deleted the fix/oauth-refresh branch March 27, 2026 04:22
hydrosquall pushed a commit to hydrosquall/goose that referenced this pull request Mar 31, 2026
…on completes (aaif-goose#7891)

Signed-off-by: sheikhlimon <sheikhlimon404@gmail.com>
Signed-off-by: Cameron Yick <cameron.yick@datadoghq.com>
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.

2 participants