SwiftScale Models Provider
Use SwiftScale smart models and commercial Direct Models in the native VS Code Chat model picker.
Features
- Signs in with a SwiftScale account through OAuth 2.0 Authorization Code + PKCE, with API keys retained for service and development use.
- Discovers the models allowed by both the signed-in account entitlements and
GET /v1/models.
- Adds Swift Auto, Swift Lite, Swift Pro, Swift Reason, Swift Agent, and available GPT, Claude, Gemini, or other Direct Models to VS Code Chat.
- Streams text and tool calls through the OpenAI-compatible Chat Completions API.
- Supports image input when the selected model advertises that capability.
- Stores OAuth access/refresh tokens or the API key in VS Code SecretStorage, never in user settings or logs.
- Honors model, plan, and project Token limits returned by SwiftScale.
- Requests 8K output Tokens by default and caps the request at the selected model's real output limit.
- Switches between Coding Plan included usage and API Services pay-as-you-go usage from the status bar or Command Palette.
Requirements
- VS Code 1.104 or newer.
- A SwiftScale account, or a project API key with
models:read and chat:write scopes.
Connect
- Install the extension.
- Open the Command Palette.
- Run SwiftScale: Sign in with SwiftScale. A browser window opens for secure account authorization.
- Open VS Code Chat and choose a model under SwiftScale.
When both products are enabled, click the Coding Plan or API Services button directly below the VS Code Chat input to toggle to the other mode, use the global SwiftScale mode item in the status bar, or run SwiftScale: Switch Service Mode for the explicit picker. Coding Plan shows only included models; API Services shows the account's enabled PAYG catalog.
For service accounts or development environments, run SwiftScale: Set API Key instead. OAuth takes precedence when both credentials exist.
You can manage the provider from Chat: Manage Language Models, or run SwiftScale: Manage Models Provider.
The production API endpoint defaults to https://api.swift-scale.com/v1. For development or an on-premise gateway, change swiftscaleModels.baseUrl in Settings.
Settings
| Setting |
Default |
Purpose |
swiftscaleModels.baseUrl |
https://api.swift-scale.com/v1 |
OpenAI-compatible SwiftScale API base URL. |
swiftscaleModels.authorizationUrl |
https://swift-scale.com/swiftcoder/authorize/ |
Browser authorization page for OAuth sign-in. |
swiftscaleModels.accountBaseUrl |
https://admin-api.swift-scale.com/v1 |
OAuth token and account-entitlement API base URL. |
swiftscaleModels.defaultMaxOutputTokens |
8192 |
Normal output budget; never exceeds the model limit. |
swiftscaleModels.showDirectModels |
true |
Show GPT, Claude, Gemini, and other project-enabled Direct Models. |
swiftscaleModels.requestTimeoutSeconds |
300 |
Maximum duration of a model generation request. |
swiftscaleModels.connectionTimeoutSeconds |
20 |
Model discovery and connection-test timeout. |
Development
npm install
npm run check
npm run lint
npm run package:vsix
Press F5 in VS Code to open an Extension Development Host.
Security
OAuth tokens and API keys are stored using VS Code SecretStorage (Keychain on macOS, system credential storage on supported platforms). OAuth uses PKCE and validates callback state. The extension does not collect telemetry and does not log prompts, responses, or credentials.
License
Apache License 2.0.