Skip to main content
Use Models in the Chat model picker and Ageneral Coder for the OpenCode coding agent in Chat, with a single sign-in. The extension connects your session to models.ageneral.ai through a virtual key for your account or project scope.
Before you begin
RequirementNotes
VS Code>= 1.94.0
NetworkAccess to ageneral.ai and models.ageneral.ai
Desktop sign-inOAuth uses a system browser and a vscode:// callback
Third-party models in Chat follow Microsoft’s guidance for Copilot Chat and language model APIs.

Quickstart

1

Install the extension

If the extension is distributed as a .vsix file, install it with ExtensionsInstall from VSIX…, or from a terminal:
code --install-extension /path/to/ageneral-<version>.vsix
When the extension is published to the Marketplace, install it from Extensions like any other extension.
2

Sign in to Ageneral

Run Ageneral: Sign In from the Command Palette or from Accounts. Complete sign-in in the browser; your session is stored securely in VS Code.
3

Choose a model and chat

Open Chat with Ctrl+Alt+I on Windows and Linux, Cmd+Alt+I on macOS, or the Chat icon in the activity bar. Pick Ageneral in the model menu for Models. Use Ageneral Coder when you want the coding agent; it uses the local OpenCode runtime with your resolved virtual key.

Sign-in and environments

OAuth expects a normal desktop: a system browser opens and returns to VS Code via vscode://. That flow is unreliable in headless or server-only dev containers without a desktop browser. For sign-in, use VS Code on a machine where the redirect works, often the host OS.

Chat participant

Participant IDNameRole
ageneral.coderAgeneral CoderHandles prompts and bridges to local OpenCode with your selected Ageneral model.
VS Code renders Chat; the extension registers a participant with vscode.chat.createChatParticipant, the same API family as GitHub Copilot Chat.

Virtual keys and billing

Inference and usage follow the same rules as direct API use. See Authentication for virtual keys and node identity, and Usage and billing for credits and errors.

Develop or package the extension

To build from source, produce a .vsix, or publish to the Marketplace, use the vscode/ package in the Ageneral repository: clone the repo, run npm install, then npm run compile for development or npm run package for production, and follow vscode/README.md for F5 debugging, vsce, and release steps.
https://mintcdn.com/ageneral/S_wwlvTeynQPbKaL/icons/material/wb-sunny.svg?fit=max&auto=format&n=S_wwlvTeynQPbKaL&q=85&s=4091bc38ee527b96b749cb6f17d22ea1

Authentication

Sessions, virtual keys, and how the extension fits in.
https://mintcdn.com/ageneral/I7mW92slaV9sl0gY/icons/material/rocket-launch.svg?fit=max&auto=format&n=I7mW92slaV9sl0gY&q=85&s=8898a3eeb358addd6dab01bc0f8536a1

Quickstart

Orient yourself and reach your first Models API call.
https://mintcdn.com/ageneral/I7mW92slaV9sl0gY/icons/material/code.svg?fit=max&auto=format&n=I7mW92slaV9sl0gY&q=85&s=493044e2e24f8e6980f57d8612be46e6

Models

Base URL, auth, and OpenAPI endpoints.
https://mintcdn.com/ageneral/I7mW92slaV9sl0gY/icons/material/stars.svg?fit=max&auto=format&n=I7mW92slaV9sl0gY&q=85&s=625d2e5a3d7001288e0859977d07d6bf

Troubleshooting

Common errors and what to try next.