René's URL Explorer Experiment


Title: Use Gemini in OpenCode: Setup Guide (2026)

Open Graph Title: Use Gemini in OpenCode: Setup Guide (2026)

X Title: Use Gemini in OpenCode: Setup Guide (2026)

Description: Set up Gemini in OpenCode step by step from official docs, base URL https://generativelanguage.googleapis.com/v1beta/openai/, model ids such as...

Open Graph Description: Set up Gemini in OpenCode step by step from official docs, base URL https://generativelanguage.googleapis.com/v1beta/openai/, model ids such as...

X Description: Set up Gemini in OpenCode step by step from official docs, base URL https://generativelanguage.googleapis.com/v1beta/openai/, model ids such as...

Opengraph URL: https://www.developersdigest.tech/setup/google/opencode

direct link

Domain: developersdigest.tech


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"Organization","name":"Developers Digest","url":"https://www.developersdigest.tech","logo":"https://avatars.githubusercontent.com/u/124798203?v=4","description":"AI-focused developer education platform covering coding tools, frameworks, and infrastructure through video tutorials, blog posts, and free developer tools.","sameAs":["https://youtube.com/@developersdigest","https://github.com/developersdigest","https://x.com/devdigest"],"founder":{"@type":"Person","name":"Developers Digest"}}
{"@context":"https://schema.org","@type":"WebSite","name":"Developers Digest","url":"https://www.developersdigest.tech","potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://www.developersdigest.tech/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}
{"@context":"https://schema.org","@type":"HowTo","name":"Use Gemini in OpenCode","description":"OpenCode's documented Custom provider recipe (a providers entry with env, package @opencode/ai/providers/openai-compatible, settings.baseURL and models) filled in with Google's documented Gemini OpenAI-compatible base URL and a current Gemini model id.","url":"https://www.developersdigest.tech/setup/google/opencode","dateModified":"2026-11-08","step":[{"@type":"HowToStep","position":1,"url":"https://www.developersdigest.tech/setup/google/opencode#step-1","name":"Get a Gemini API key from Google AI Studio (https://aistudio.google.com/apikey).","text":"Get a Gemini API key from Google AI Studio (https://aistudio.google.com/apikey)."},{"@type":"HowToStep","position":2,"url":"https://www.developersdigest.tech/setup/google/opencode#step-2","name":"Make the key available as GEMINI_API_KEY in the environment OpenCode runs in. The Custom provider's env field lists the environment variable names that can provide the credential.","text":"Make the key available as GEMINI_API_KEY in the environment OpenCode runs in. The Custom provider's env field lists the environment variable names that can provide the credential.\nexport GEMINI_API_KEY=your-key"},{"@type":"HowToStep","position":3,"url":"https://www.developersdigest.tech/setup/google/opencode#step-3","name":"Add the provider to opencode.jsonc (or opencode.json). This is OpenCode's Custom provider example with Google's documented OpenAI-compatible base URL and model id substituted in. The key under providers ('gemini-openai' here is an arbitrary example) becomes the provider ID in model references.","text":"Add the provider to opencode.jsonc (or opencode.json). This is OpenCode's Custom provider example with Google's documented OpenAI-compatible base URL and model id substituted in. The key under providers ('gemini-openai' here is an arbitrary example) becomes the provider ID in model references.\n{\n  \"$schema\": \"https://opencode.ai/config.json\",\n  \"providers\": {\n    \"gemini-openai\": {\n      \"name\": \"Google Gemini\",\n      \"env\": [\"GEMINI_API_KEY\"],\n      \"package\": \"@opencode/ai/providers/openai-compatible\",\n      \"settings\": {\n        \"baseURL\": \"https://generativelanguage.googleapis.com/v1beta/openai/\",\n      },\n      \"models\": {\n        \"gemini-3.8-flash\": {\n          \"name\": \"Gemini 3.8 Flash\",\n        },\n      },\n    },\n  },\n}"},{"@type":"HowToStep","position":4,"url":"https://www.developersdigest.tech/setup/google/opencode#step-4","name":"Run /models and pick the Gemini model; the selection applies to the current session. To make it the default for new work, set model to provider/model.","text":"Run /models and pick the Gemini model; the selection applies to the current session. To make it the default for new work, set model to provider/model.\n{\n  \"$schema\": \"https://opencode.ai/config.json\",\n  \"model\": \"gemini-openai/gemini-3.8-flash\",\n}"}]}
{"@context":"https://schema.org","@type":"FAQPage","mainEntity":[{"@type":"Question","name":"How do I use Gemini in OpenCode?","acceptedAnswer":{"@type":"Answer","text":"OpenCode's documented Custom provider recipe (a providers entry with env, package @opencode/ai/providers/openai-compatible, settings.baseURL and models) filled in with Google's documented Gemini OpenAI-compatible base URL and a current Gemini model id."}},{"@type":"Question","name":"Which Gemini model ids work in OpenCode?","acceptedAnswer":{"@type":"Answer","text":"The official docs read for this guide list gemini-4-argon, gemini-3.8-flash, gemini-3.6-flash, gemini-3.5-flash-lite and gemini-3.1-pro-preview. Requests go to https://generativelanguage.googleapis.com/v1beta/openai/."}},{"@type":"Question","name":"Is this an official Gemini and OpenCode setup?","acceptedAnswer":{"@type":"Answer","text":"The steps draw on both Gemini's and OpenCode's docs. It was last checked against 4 official pages on November 8, 2026."}}]}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://www.developersdigest.tech"},{"@type":"ListItem","position":2,"name":"Setup guides","item":"https://www.developersdigest.tech/setup"},{"@type":"ListItem","position":3,"name":"Gemini","item":"https://www.developersdigest.tech/setup/google"},{"@type":"ListItem","position":4,"name":"OpenCode"}]}

og:site_nameDevelopers Digest
og:imagehttps://www.developersdigest.tech/og/guides/setup-google-opencode?title=Use+Gemini+in+OpenCode&subtitle=From+Gemini+and+OpenCode+docs+-+verified+November+8,+2026
og:image:width1200
og:image:height630
og:image:altUse Gemini in OpenCode
og:typearticle
twitter:cardsummary_large_image
twitter:creator@devdigest
twitter:imagehttps://www.developersdigest.tech/og/guides/setup-google-opencode?title=Use+Gemini+in+OpenCode&subtitle=From+Gemini+and+OpenCode+docs+-+verified+November+8,+2026
twitter:image:altUse Gemini in OpenCode
twitter:image:width1200
twitter:image:height630
theme-color#ffffff
google-adsense-accountca-pub-2667478487260700

Links:

Skip to main contenthttps://developersdigest.tech/setup/google/opencode#main-content
Watch: Grok Bot Built My AI Video Arena While I Tested 8 Modelshttps://developersdigest.tech/tutorials/cS7vfC28Nv8
DEVDIGESThttps://developersdigest.tech/
Watchhttps://developersdigest.tech/tutorials
Readhttps://developersdigest.tech/blog
Comparehttps://developersdigest.tech/compare
Tool comparisonsAI coding tools head to headhttps://developersdigest.tech/compare
Model comparisonsTwo models side by sidehttps://developersdigest.tech/models/compare
ModelsAPI prices and specshttps://developersdigest.tech/models
Local modelsRun open weights yourselfhttps://developersdigest.tech/local-models
BenchmarksSourced leaderboardshttps://developersdigest.tech/benchmarks
Rate limitsLimits by provider and tierhttps://developersdigest.tech/rate-limits
DeprecationsModel shutdown dateshttps://developersdigest.tech/deprecations
Setup guidesModels in your coding toolshttps://developersdigest.tech/setup
Error fixesCoding agent errors, solvedhttps://developersdigest.tech/errors
CLI referenceAgent flags and commandshttps://developersdigest.tech/reference
MCP serversOfficial servers, verifiedhttps://developersdigest.tech/mcp-servers
GlossaryAI terms, definedhttps://developersdigest.tech/glossary
All data directorieshttps://developersdigest.tech/data
Learnhttps://developersdigest.tech/courses
https://github.com/developersdigest
https://youtube.com/@developersdigest
Dashboardhttps://developersdigest.tech/dashboard
Subscribehttps://developersdigest.tech/newsletter
Sign inhttps://developersdigest.tech/sign-in
Get startedhttps://developersdigest.tech/sign-up
Sign inhttps://developersdigest.tech/sign-in
Get startedhttps://developersdigest.tech/sign-up
Subscribehttps://developersdigest.tech/newsletter
Dashboardhttps://developersdigest.tech/dashboard
Sign inhttps://developersdigest.tech/sign-in
Subscribehttps://developersdigest.tech/newsletter
Watchhttps://developersdigest.tech/tutorials
Readhttps://developersdigest.tech/blog
Comparehttps://developersdigest.tech/compare
Learnhttps://developersdigest.tech/courses
Modelshttps://developersdigest.tech/models
Local modelshttps://developersdigest.tech/local-models
Benchmarkshttps://developersdigest.tech/benchmarks
Rate limitshttps://developersdigest.tech/rate-limits
Deprecationshttps://developersdigest.tech/deprecations
Setup guideshttps://developersdigest.tech/setup
Error fixeshttps://developersdigest.tech/errors
CLI referencehttps://developersdigest.tech/reference
MCP servershttps://developersdigest.tech/mcp-servers
Glossaryhttps://developersdigest.tech/glossary
Subscribehttps://developersdigest.tech/newsletter
YouTubehttps://youtube.com/@developersdigest
GitHubhttps://github.com/developersdigest
Dashboardhttps://developersdigest.tech/dashboard
Get startedhttps://developersdigest.tech/sign-up
Sign inhttps://developersdigest.tech/sign-in
Homehttps://developersdigest.tech/
Setup guideshttps://developersdigest.tech/setup
Geminihttps://developersdigest.tech/setup/google
4 official sourceshttps://developersdigest.tech/setup/google/opencode#sources-heading
https://aistudio.google.com/apikeyhttps://aistudio.google.com/apikey
gemini-4-argonhttps://developersdigest.tech/models/gemini-4-argon
gemini-3.8-flashhttps://developersdigest.tech/models/gemini-3-8-flash
gemini-3.6-flashhttps://developersdigest.tech/models/gemini-3-6-flash
gemini-3.5-flash-litehttps://developersdigest.tech/models/gemini-3-5-flash-lite
gemini-3.1-pro-previewhttps://developersdigest.tech/models/gemini-3-1-pro
OpenCode in the tools directoryhttps://developersdigest.tech/tools/opencode
Use DeepSeek in OpenCodehttps://developersdigest.tech/setup/deepseek/opencode
Use GLM in OpenCodehttps://developersdigest.tech/setup/zai/opencode
Use Grok in OpenCodehttps://developersdigest.tech/setup/xai/opencode
Use Kimi in OpenCodehttps://developersdigest.tech/setup/moonshot/opencode
Use LM Studio in OpenCodehttps://developersdigest.tech/setup/lmstudio/opencode
Use MiniMax in OpenCodehttps://developersdigest.tech/setup/minimax/opencode
Use Mistral in OpenCodehttps://developersdigest.tech/setup/mistral/opencode
Use Ollama in OpenCodehttps://developersdigest.tech/setup/ollama/opencode
Use OpenAI in OpenCodehttps://developersdigest.tech/setup/openai/opencode
Use OpenRouter in OpenCodehttps://developersdigest.tech/setup/openrouter/opencode
Use Qwen in OpenCodehttps://developersdigest.tech/setup/qwen/opencode
Use Gemini in Aiderhttps://developersdigest.tech/setup/google/aider
Use Gemini in Clinehttps://developersdigest.tech/setup/google/cline
Use Gemini in Continuehttps://developersdigest.tech/setup/google/continue
Use Gemini in Cursorhttps://developersdigest.tech/setup/google/cursor
Use Gemini in GitHub Copilothttps://developersdigest.tech/setup/google/github-copilot
Use Gemini in Goosehttps://developersdigest.tech/setup/google/goose
Use Gemini in Kilo Codehttps://developersdigest.tech/setup/google/kilo-code
Use Gemini in Zedhttps://developersdigest.tech/setup/google/zed
Headless AI Coding Agents in CI: Claude Code, Codex CLI, Gemini CLI, and opencode ComparedHeadless AI coding agents in CI compared: Claude Code, Codex CLI, Gemini CLI, and opencode on invocation flags, sandboxing, auth, and output formats.https://developersdigest.tech/blog/headless-ai-coding-agents-ci-comparison-2026
Gemini Trains on Your Chats Unless Keep Activity Is OffA Tell HN says paying for Gemini does not stop chat training. What Google documents about Keep Activity, human review and 3-year retention, and what developers should do before pasting code.https://developersdigest.tech/blog/gemini-keep-activity-training-human-review-paid-subscribers-2026
Gemini 4 Carbon: Benchmarks, Pricing, and AccessGemini 4 Carbon is Google's new frontier model: 59 on the AA Intelligence Index, $2/$10 intro pricing, but cyber-defender access only. What builders do now.https://developersdigest.tech/blog/gemini-4-carbon-developer-guide-2026
AI API 429, 529 and 503 Errors: Retry Rules That Match the DocsWhich 429, 529 and 503 errors to retry across OpenAI, Claude, Gemini and Bedrock, how to read Retry-After, and a typed wrapper that skips quota errors.https://developersdigest.tech/blog/ai-api-rate-limit-retry-guide-2026
AI Model Shutdown Dates 2026-2027: Calendar and Migration PlanEvery scheduled AI model API shutdown through mid 2027 by month: GPT-4o on Jan 14, whisper-1 on Feb 26, Claude Sonnet 4.5 on Nov 30, plus how to migrate.https://developersdigest.tech/blog/ai-model-shutdowns-2026-2027
Gemini Live and TTS Preview Models Retire November 17: Moving to Gemini 3.8 Live and 3.8 Flash TTSThe Gemini API shuts down two Live API preview models and three TTS preview models on November 17, 2026. Replacement ids, what changes in the session config and TTS request, prices before and after, and the code change.https://developersdigest.tech/blog/gemini-live-tts-retirement-november-2026
https://generativelanguage.googleapis.com/v1beta/openai/https://generativelanguage.googleapis.com/v1beta/openai/
https://opencode.ai/docs/providers/https://opencode.ai/docs/providers/
https://opencode.ai/docs/models/https://opencode.ai/docs/models/
https://ai.google.dev/gemini-api/docs/openaihttps://ai.google.dev/gemini-api/docs/openai
https://ai.google.dev/gemini-api/docs/modelshttps://ai.google.dev/gemini-api/docs/models
All setup guideshttps://developersdigest.tech/setup
Every Gemini guidehttps://developersdigest.tech/setup/google
Model pricing and specshttps://developersdigest.tech/models
https://youtube.com/@developersdigest
https://x.com/devdigest
https://github.com/developersdigest
App Builderhttps://developersdigest.tech/dashboard/app-builder-v2
Chathttps://developersdigest.tech/dashboard/chat
AgentCanvashttps://developersdigest.tech/canvas
Multi-Media Studiohttps://developersdigest.tech/dashboard/tools
Skill Studiohttps://developersdigest.tech/dashboard/skills-studio
Artifactshttps://developersdigest.tech/dashboard/artifacts
Agent toolshttps://developersdigest.tech/dashboard/agent-tools
API Keyshttps://developersdigest.tech/dashboard/keys
Bloghttps://developersdigest.tech/blog
Essayshttps://developersdigest.tech/essays
Tutorialshttps://developersdigest.tech/tutorials
Guideshttps://developersdigest.tech/guides
Courseshttps://developersdigest.tech/courses
Daily Briefhttps://developersdigest.tech/daily
Tools Directoryhttps://developersdigest.tech/tools
Comparehttps://developersdigest.tech/compare
Toolkithttps://developersdigest.tech/toolkit
Libraryhttps://developersdigest.tech/library
Skillshttps://developersdigest.tech/skills
Projectshttps://developersdigest.tech/projects
Modelshttps://developersdigest.tech/models
Local modelshttps://developersdigest.tech/local-models
Benchmarkshttps://developersdigest.tech/benchmarks
Rate limitshttps://developersdigest.tech/rate-limits
Deprecationshttps://developersdigest.tech/deprecations
Setup guideshttps://developersdigest.tech/setup
Error fixeshttps://developersdigest.tech/errors
CLI referencehttps://developersdigest.tech/reference
MCP servershttps://developersdigest.tech/mcp-servers
Glossaryhttps://developersdigest.tech/glossary
Model comparisonshttps://developersdigest.tech/models/compare
All datahttps://developersdigest.tech/data
Abouthttps://developersdigest.tech/about
Connecthttps://developersdigest.tech/connect
Newsletterhttps://developersdigest.tech/newsletter
Write for ushttps://developersdigest.tech/write-for-us
Sponsorhttps://developersdigest.tech/sponsor
Pricinghttps://developersdigest.tech/pricing
Changeloghttps://developersdigest.tech/dashboard/whats-new
Privacy Policyhttps://developersdigest.tech/privacy
Terms of Servicehttps://developersdigest.tech/terms
Affiliate Disclosurehttps://developersdigest.tech/affiliate-disclosure
Contacthttps://developersdigest.tech/contact
Privacyhttps://developersdigest.tech/privacy
Termshttps://developersdigest.tech/terms

Viewport: width=device-width, initial-scale=1


URLs of crawlers that visited me.