How to Connect GPT 6.2 Models in OpenCode via Agent Router (+$175 Free Credits)
Here is a quick guide to connecting GPT 6.2 Sol and GPT 6 Astra in OpenCode via Agent Router and claiming a \$175 bonus: Register: Sign up using the invite link to receive the \$175 credit: Register on Agent Router (+
Here is a quick guide to connecting GPT 6.2 Sol and GPT 6 Astra in OpenCode via Agent Router and claiming a \$175 bonus:
- Register: Sign up using the invite link to receive the \$175 credit: Register on Agent Router (+\$175 Bonus) (required for the bonus).
- Account Setup: Log in via GitHub and verify your \$175 balance.
-
API Key: Generate an API key in your dashboard, set the limit to
750,000,000, and copy thesk-key. -
Configure OpenCode: Create or edit
opencode.jsonin~/.config/opencode(or%USERPROFILE%\.config\opencodeon Windows) with your gateway settings and API key:
{
"\$schema": "https://opencode.ai",
"provider": {
"AgentRouter-openai-gateway": {
"npm": "@ai-sdk/openai",
"name": "AgentRouter OpenAI",
"options": {
"baseURL": "https://agentrouter.org",
"apiKey": "YOUR_API_KEY"
},
"models": {
"gpt-6.2-sol": { "name": "GPT 6.2 Sol" },
"gpt-6-astra": { "name": "GPT 6 Astra" }
}
}
},
"model": "AgentRouter-openai-gateway/gpt-6.2-sol"
}
(Replace "YOUR_API_KEY" with your copied key).
- Launch: Save the file, restart OpenCode, and select GPT 6.2 Sol or GPT 6 Astra from your model selector.
π° Read the original article on Dev.to AI
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.