πŸ” Connection via OAuth

OAuth authentication allows you to connect AI providers more simply, without needing to manually copy and paste API keys. You just need to authenticate with your existing account through a secure browser window.


🌟 Advantages of OAuth

  • No Key Management: Authenticate with one click.
  • Enhanced Security: You never handle the raw API keys directly.
  • Auto-Renewal: Tokens are managed and renewed automatically by the system.
  • User Friendly: Quick setup using your existing provider account.

πŸ“‹ Available OAuth Providers

OAuth tab showing Anthropic, Claude Code, and Gemini CLI authentication options

1. Anthropic

Direct authentication with your Anthropic account.

To connect:

  1. Click the "Anthropic" button in the OAuth tab.
  2. A browser window will open.
  3. Log in to your Anthropic account.
  4. Authorize CodeGPT to access your account.
  5. You will be redirected back to VS Code.

2. Claude Code

Authentication with Claude Code for direct access to Anthropic's models.

To connect:

  1. Click the "Claude Code" button.
  2. Follow the authentication flow in your browser.
  3. Authorize the connection.
  4. The link is established automatically.

3. Gemini CLI

Authentication with Google Gemini using standard Google sign-in.

To connect:

  1. Click the "Gemini CLI" button.
  2. Authenticate using your Google account in the browser.
  3. Authorize the connection.
  4. The link is established automatically.

πŸš€ Connection Steps

Step 1: Access the Panel

  1. Open the Manage my AI Models panel in VS Code.
  2. Click on the "OAuth" tab.

Step 2: Authenticate

  1. Choose your provider and click the connection button.
  2. Follow the steps in your browser.
  3. Confirm the authorization.

Step 3: Ready to use

Once authenticated, the provider will show as Connected and you can start using its models immediately.


πŸ”„ Session Management

To disconnect or switch accounts, simply go back to the OAuth panel and click Logout. This will clear the session tokens from your local machine.


πŸ”œ Next Step

Want to run models offline? Check out Local Models.