Prerequisites
- Continue for VS Code, JetBrains, or the Continue CLI.
- A NEAR AI Cloud API key from the NEAR AI Cloud Dashboard.
- A local Continue
config.yaml.
apiKey: ${{ secrets.NEARAI_API_KEY }} in config.yaml; it resolves secrets from workspace .env files, .continue/.env, ~/.continue/.env, or process environment variables for the CLI.
For IDE extensions, prefer a .env file because the extension may not read your shell environment. Do not commit .env files.
Base URL
Use the NEAR AI Cloud gateway base URL:/chat/completions to apiBase. Continue adds the request path when it calls the OpenAI-compatible API.
Model ID
Use the NEAR AI Cloud gateway model ID:Configure
Add a model entry like this to Continue’sconfig.yaml:
capabilities: [tool_use] is required for Agent mode. Continue only auto-detects native tool calling for a fixed list of model names (GPT, o-series, and a few others); for a custom model ID like z-ai/glm-5.2 it defaults to no tool support, so you must set tool_use explicitly or Agent mode falls back to a degraded prompt-based tool path instead of native function calling. GLM 5.2 advertises tools in /v1/models, so this is accurate, not aspirational.
The remaining fields are optional metadata that match the live /v1/models record. contextLength: 500000 and maxTokens: 131072 set the context and output budgets. defaultCompletionOptions.reasoning: true tells Continue to display and parse the model’s thinking output — with provider: openai it is not added to the request, so it does not turn reasoning on. GLM 5.2 emits reasoning by default server-side, and this flag surfaces it in Continue’s thinking pane. Basic chat works without these fields.
Reload Continue after saving the config. In VS Code, use the command palette and run Developer: Reload Window if the model list does not update.
Refresh models
Continue uses the model IDs in yourconfig.yaml; it does not need to discover this model from a provider catalog. When NEAR AI Cloud releases a new model:
- Run
curl https://cloud-api.near.ai/v1/models. - Copy the new model’s
id. - Replace or add the
model:value inconfig.yaml. - Reload Continue or restart the IDE if the model picker is stale.
/v1/models. Do not invent aliases unless NEAR AI Cloud lists them.
Quick test
Before debugging Continue, verify the same key, base URL, and model with curl:Troubleshooting
Example targeted fallback:
Related guides
- Model Discovery and Refresh
- OpenAI Compatibility
- Available Models
- Cline, Roo Code, and Kilo Code
- Aider and Zed