Skip to content

Allowing model providers to have oauth implementation#2

Open
ChaiEranki wants to merge 1 commit into
mainfrom
custom-model-provider-oauth
Open

Allowing model providers to have oauth implementation#2
ChaiEranki wants to merge 1 commit into
mainfrom
custom-model-provider-oauth

Conversation

@ChaiEranki

@ChaiEranki ChaiEranki commented Jan 7, 2026

Copy link
Copy Markdown
Owner

This change allows a model provider to use OAuth similar to what ChatGPT default auth uses. To do this, the following changes are made:

  • Extra variables are added to the ModelProviderInfo struct in model_provider_info.rs that allow the user to configure oauth
  • A new login screen specifically for custom model provider oauth is created: making it so that if the model provider is configured to use custom oauth, the user will see a set of screens in the beginning showing the status of logging in: codex-rs/tui/src/onboarding/auth.rs
  • A new field was added to the auth.json file that stores user tokens telling the user which provider oauth was used to generate it
  • New fields were added to the ServerOpts to customize the codex server that is created when oauth is run. This removes hard-coded variables for ChatGPT oauth
  • A new AuthMode called ProviderOAuth was added in additon to ChatGPT and ApiKey that already exist

Enhancement request: openai#8937

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