Skip to content

Provider Setup

Snowy edited this page Feb 15, 2026 · 1 revision

Provider Setup

SnCode supports two AI providers: Anthropic (Claude models) and OpenAI (Codex models). You can use one or both simultaneously.

Supported Models

Model ID Label Provider Notes
claude-opus-4-6 Opus 4.6 Anthropic Most capable, default
claude-sonnet-4-5 Sonnet 4.5 Anthropic Balanced
claude-haiku-4-5 Haiku 4.5 Anthropic Fast, cost-effective
gpt-5.3-codex Codex 5.3 OpenAI Most capable Codex
gpt-5.2-codex Codex 5.2 OpenAI Balanced
gpt-5.1-codex-mini Codex 5.1 Mini OpenAI Fast, cost-effective

Authentication Methods

Each provider supports two authentication modes:

API Key

The simplest method. Get a key from:

Paste the key in Settings > Providers, or during onboarding. Keys are stored securely in your OS keychain (Windows Credential Manager, macOS Keychain, or libsecret on Linux).

Subscription (OAuth)

Use your existing paid subscription without needing a separate API key.

Anthropic OAuth (PKCE Authorization Code Flow)

This uses the same subscription that powers Claude.ai (Claude Pro, Max, etc.):

  1. Click "Sign in with Claude" in Settings or during onboarding
  2. Your browser opens to claude.ai/oauth/authorize
  3. Approve the authorization request
  4. Copy the authorization code shown in the browser
  5. Paste the code back into SnCode
  6. SnCode exchanges the code for access and refresh tokens

Technical details:

  • OAuth Client ID: 9d1c250a-e61b-44d9-88ed-5944d1962f5e
  • PKCE with S256 challenge
  • Scopes: org:create_api_key, user:profile, user:inference
  • Tokens are automatically refreshed before expiry

OpenAI OAuth (Device Code Flow)

This uses your ChatGPT Plus/Pro subscription:

  1. Click "Sign in with ChatGPT" in Settings or during onboarding
  2. Your browser opens to auth.openai.com/codex/device
  3. A user code is displayed in SnCode — enter it in your browser
  4. Approve the authorization
  5. SnCode automatically detects the approval (polls every 6 seconds, up to 5 minutes)

Technical details:

  • OAuth Client ID: app_EMoamEEZ73f0CkXaXp7hrann
  • Issuer: https://auth.openai.com
  • Device authorization with PKCE exchange
  • Tokens are automatically refreshed before expiry

Managing Providers in Settings

Open Settings (Ctrl+, / Cmd+,) and navigate to the Providers tab:

  • Enable/disable providers with the toggle switch
  • Switch auth mode between API Key and Subscription
  • Change model using the model dropdown
  • Re-authenticate by entering a new key or re-running OAuth
  • A green checkmark indicates active credentials

Token Storage

All credentials (API keys and OAuth tokens) are stored in your operating system's secure keychain:

OS Storage
Windows Windows Credential Manager
macOS Keychain
Linux libsecret / GNOME Keyring

OAuth tokens are stored as JSON with the prefix oauth: and include the access token, refresh token, and expiration timestamp. They are automatically refreshed when they expire.

Clear All Data

To remove all credentials and reset SnCode:

  1. Open Settings
  2. Scroll to the bottom of the General tab
  3. Click Clear all data

This removes all credentials from the keychain, deletes all projects and threads, and resets settings to defaults.

Clone this wiki locally