Continue Integration with The Grid | config.yaml Setup
Set up Continue with The Grid in config.yaml. Add your API key, point to the OpenAI-compatible endpoint, and map models to chat, edit, and autocomplete.
Continue is an open-source AI coding assistant for VS Code and JetBrains. The Grid plugs in as a standard OpenAI-compatible provider through config.yaml. Continue's role-based model assignment (chat, edit, apply, autocomplete, summarize, subagent) maps cleanly onto Grid instrument tiers.
Prerequisites
Continue installed (VS Code extension or JetBrains plugin, latest version).
A Grid account at app.thegrid.ai.
Credits in your account. The Grid is prepaid; zero credits returns 402.
A Grid consumption API key from Settings → API Keys → Create Consumption Key.
Setup
1. Store the key in Continue's local .env
Continue reads secrets from ~/.continue/.env (or the directory set by CONTINUE_GLOBAL_DIR). Add:
THEGRID_API_KEY=your-consumption-api-key-hereNo quotes, no export, no spaces around =.
2. Add Grid instruments to config.yaml
Open ~/.continue/config.yaml. Continue creates this file the first time you open the side panel. Add Grid instruments under models:, each with the roles it's best suited for. Use instrument IDs from the current instruments list:
name: My Continue Config
version: 1.0.0
schema: v1
models:
- name: Grid Code Prime
provider: openai
model: code-prime
apiKey: ${{ secrets.THEGRID_API_KEY }}
apiBase: https://api.thegrid.ai/v1
defaultCompletionOptions:
contextLength: 128000
maxTokens: 32000
roles:
- chat
- edit
- name: Grid Code Standard
provider: openai
model: code-standard
apiKey: ${{ secrets.THEGRID_API_KEY }}
apiBase: https://api.thegrid.ai/v1
defaultCompletionOptions:
contextLength: 128000
maxTokens: 32000
roles:
- apply
- autocomplete
- name: Grid Agent Prime
provider: openai
model: agent-prime
apiKey: ${{ secrets.THEGRID_API_KEY }}
apiBase: https://api.thegrid.ai/v1
defaultCompletionOptions:
contextLength: 128000
maxTokens: 32000
roles:
- subagent
- name: Grid Text Standard
provider: openai
model: text-standard
apiKey: ${{ secrets.THEGRID_API_KEY }}
apiBase: https://api.thegrid.ai/v1
defaultCompletionOptions:
contextLength: 128000
maxTokens: 32000
roles:
- summarizeA few field-name details that catch people: provider: openai is Continue's generic OpenAI-compatible provider (there's no Grid-specific provider name). apiBase and apiKey are camelCase; base_url and api_key are silently ignored.
Set contextLength and maxTokens per model under defaultCompletionOptions. Continue errors if maxTokens leaves no room within contextLength, and it trims history against contextLength, so an accurate value keeps it from sending a request that overruns the window. The Standard and Prime instruments above carry a 128K context window; the Max instruments carry 1M. Keep maxTokens well below the context length. If you add an instrument not shown here, get its context window from the current instruments list.
3. Add an embeddings provider
The Grid does not yet expose embedding instruments. Continue needs one for @codebase and @folder indexing. Pair The Grid with Voyage or a local Ollama embedding model:
Chat and edit work without this; only codebase indexing degrades.
4. Reload Continue
Continue watches config.yaml and reloads on save. If a change does not stick, run Developer: Reload Window from the command palette.
Verification
Open the Continue side panel, pick Grid Code Prime from the model dropdown, and try: "Refactor this function to use async/await instead of callbacks." Then test autocomplete by typing in a code file (code-standard should serve), and test inline edit with Cmd/Ctrl+I. If all three paths work, the integration is live.
Troubleshooting
Last updated
Was this helpful?