{"id":11152,"date":"2026-10-11T17:30:47","date_gmt":"2026-10-11T16:30:47","guid":{"rendered":"https:\/\/rainbowbreeze.it\/wordpress\/?p=11152"},"modified":"2026-10-11T17:30:47","modified_gmt":"2026-10-11T16:30:47","slug":"gemini-in-opencode-via-vertex-ai","status":"publish","type":"post","link":"https:\/\/rainbowbreeze.it\/wordpress\/gemini-in-opencode-via-vertex-ai\/","title":{"rendered":"Use Gemini in OpenCode via Vertex AI provider"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Google prohibits third-party software (<em>such as OpenCode, Hermes Agent, OpenClaw, etc<\/em>), from using consumer OAuth tokens to access Gemini API, making subscription services like Google AI Pro and Ultra non usable with them. To safely use Gemini models in third-party software, there are two legitimate options:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Google AI Studio (Pay-as-you-go):<\/strong> Add prepaid billing (min $10) at <a href=\"https:\/\/ai.google.dev\/aistudio\">Google AI Studio<\/a> and generate a commercial Gemini API key.<\/li>\n\n\n\n<li><strong>GCP Service Account via <strong><a href=\"https:\/\/docs.cloud.google.com\/gemini-enterprise-agent-platform\/vertex-ai-name-changes\">Gemini Enterprise Agent Platform<\/a><\/strong><\/strong> <strong>provider<\/strong> (<em>former Vertex AI<\/em><strong>):<\/strong> Call the Gemini API via Google Cloud&#8217;s AI platform. This gives isolated billing, regional data control, postponed billing, and other benefits.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Here are the steps to create a GCP service account (<em>a non-human identity that owns a downloadable JSON key<\/em>), and how to configure OpenCode to use it to access Gemini models. Bonus points: the same approach works also in Hermes Agent, OpenClaw and other tools, and the Agent Platform provider makes available many more model to use, not only the ones from Google. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Setup a GCP Project<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Step A: Create a GCP Project &amp; enable billing<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Open <a href=\"https:\/\/console.cloud.google.com\/\">Google Cloud Console<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/console.cloud.google.com\/projectcreate\">Create a project<\/a> named <code>opencode-dev<\/code><\/li>\n\n\n\n<li>Go to <strong>Billing<\/strong> and create a <a href=\"https:\/\/docs.cloud.google.com\/billing\/docs\/how-to\/manage-billing-account\">Billing Account<\/a> and <a href=\"https:\/\/docs.cloud.google.com\/billing\/docs\/how-to\/modify-project#enable_billing_for_a_project\">link the project to it<\/a>. <a href=\"https:\/\/docs.cloud.google.com\/billing\/docs\/how-to\/verify-billing-enabled\">Verify if the proejct is linked<\/a><\/li>\n\n\n\n<li>There is no need to create a new project. An existing project, with a working billing account, can also be used to create the required Service Account.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"572\" height=\"515\" src=\"http:\/\/rainbowbreeze.it\/wordpress\/wp-content\/uploads\/2026\/10\/20261011-opencode_vertexai-01.png\" alt=\"Screen to create a new project in Google Cloud Platform\" class=\"wp-image-11155\" srcset=\"https:\/\/rainbowbreeze.it\/wordpress\/wp-content\/uploads\/2026\/10\/20261011-opencode_vertexai-01.png 572w, https:\/\/rainbowbreeze.it\/wordpress\/wp-content\/uploads\/2026\/10\/20261011-opencode_vertexai-01-300x270.png 300w, https:\/\/rainbowbreeze.it\/wordpress\/wp-content\/uploads\/2026\/10\/20261011-opencode_vertexai-01-200x180.png 200w\" sizes=\"auto, (max-width: 572px) 100vw, 572px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Step B: Enable the Agent Platform API for the project<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>In the Google Cloud Console, ensure the project <code>opencode-dev<\/code> is selected in the upper left selector<\/li>\n\n\n\n<li>Go to <strong>APIs &amp; Services > Enabled APIs &amp; Services<\/strong> (<a href=\"https:\/\/console.cloud.google.com\/apis\/dashboard\">direct link<\/a>)<\/li>\n\n\n\n<li>Click <strong>+ Enable APIs and services<\/strong>.<\/li>\n\n\n\n<li>Search for <strong>Agent Platform API<\/strong> (<a href=\"https:\/\/console.cloud.google.com\/apis\/library\/aiplatform.googleapis.com\">direct link<\/a>) and click <strong>Enable<\/strong>.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"754\" height=\"463\" src=\"https:\/\/rainbowbreeze.it\/wordpress\/wp-content\/uploads\/2026\/10\/20261011-opencode_vertexai-05.png\" alt=\"\" class=\"wp-image-11159\" srcset=\"https:\/\/rainbowbreeze.it\/wordpress\/wp-content\/uploads\/2026\/10\/20261011-opencode_vertexai-05.png 754w, https:\/\/rainbowbreeze.it\/wordpress\/wp-content\/uploads\/2026\/10\/20261011-opencode_vertexai-05-300x184.png 300w, https:\/\/rainbowbreeze.it\/wordpress\/wp-content\/uploads\/2026\/10\/20261011-opencode_vertexai-05-200x123.png 200w\" sizes=\"auto, (max-width: 754px) 100vw, 754px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Step C: Create the Service Account<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Go to <strong>IAM &amp; Admin > Service Accounts<\/strong>.<\/li>\n\n\n\n<li>Click <strong>+ Create Service Account<\/strong>.<\/li>\n\n\n\n<li>Set the service account name to <code>opencode-laptop<\/code> and description to <code>Use OpenCode on my dev machine<\/code> <\/li>\n\n\n\n<li>Click <strong>Create and continue<\/strong>.<\/li>\n\n\n\n<li>In the <strong>Grant this service account access to project<\/strong> section, use the filter box to search for <code>aiplatform.user<\/code>.<\/li>\n\n\n\n<li>Select the role <strong>Agent Platform User<\/strong> (formerly <em>Vertex AI User<\/em>, <code>roles\/aiplatform.user<\/code>).<\/li>\n\n\n\n<li>Click <strong>Continue<\/strong>.<\/li>\n\n\n\n<li>In the next step (<strong>Grant users access to this service account \/ Principals with access<\/strong>), leave all fields empty.<\/li>\n\n\n\n<li>Click <strong>Done<\/strong> to finish creating the service account.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"570\" height=\"604\" src=\"http:\/\/rainbowbreeze.it\/wordpress\/wp-content\/uploads\/2026\/10\/20261011-opencode_vertexai-02.png\" alt=\"\" class=\"wp-image-11156\" srcset=\"https:\/\/rainbowbreeze.it\/wordpress\/wp-content\/uploads\/2026\/10\/20261011-opencode_vertexai-02.png 570w, https:\/\/rainbowbreeze.it\/wordpress\/wp-content\/uploads\/2026\/10\/20261011-opencode_vertexai-02-283x300.png 283w, https:\/\/rainbowbreeze.it\/wordpress\/wp-content\/uploads\/2026\/10\/20261011-opencode_vertexai-02-189x200.png 189w\" sizes=\"auto, (max-width: 570px) 100vw, 570px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"559\" height=\"623\" src=\"http:\/\/rainbowbreeze.it\/wordpress\/wp-content\/uploads\/2026\/10\/20261011-opencode_vertexai-03.png\" alt=\"\" class=\"wp-image-11157\" srcset=\"https:\/\/rainbowbreeze.it\/wordpress\/wp-content\/uploads\/2026\/10\/20261011-opencode_vertexai-03.png 559w, https:\/\/rainbowbreeze.it\/wordpress\/wp-content\/uploads\/2026\/10\/20261011-opencode_vertexai-03-269x300.png 269w, https:\/\/rainbowbreeze.it\/wordpress\/wp-content\/uploads\/2026\/10\/20261011-opencode_vertexai-03-179x200.png 179w\" sizes=\"auto, (max-width: 559px) 100vw, 559px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"564\" height=\"505\" src=\"http:\/\/rainbowbreeze.it\/wordpress\/wp-content\/uploads\/2026\/10\/20261011-opencode_vertexai-04.png\" alt=\"\" class=\"wp-image-11158\" srcset=\"https:\/\/rainbowbreeze.it\/wordpress\/wp-content\/uploads\/2026\/10\/20261011-opencode_vertexai-04.png 564w, https:\/\/rainbowbreeze.it\/wordpress\/wp-content\/uploads\/2026\/10\/20261011-opencode_vertexai-04-300x269.png 300w, https:\/\/rainbowbreeze.it\/wordpress\/wp-content\/uploads\/2026\/10\/20261011-opencode_vertexai-04-200x179.png 200w\" sizes=\"auto, (max-width: 564px) 100vw, 564px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Step C: Create and download the Service Account JSON file<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Go to <strong>IAM &amp; Admin &gt; Service Accounts<\/strong>.<\/li>\n\n\n\n<li>From the list of Service Accounts, click on <code>opencode-laptop<\/code>, and then open the <strong>Keys<\/strong> tab.<\/li>\n\n\n\n<li>Click <strong>Add Key > Create new key<\/strong> > select <strong>JSON<\/strong> > <strong>Create<\/strong>.<\/li>\n\n\n\n<li>Save the file to <code>~\/.config\/opencode\/opencode-devmachine.json<\/code><\/li>\n\n\n\n<li>For additional security, restrict file permissions to 600 (<em>only owner has read+write permission<\/em>)<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"language-bash\">chmod 600 ~\/.config\/opencode\/opencode-devmachine.json<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Configure OpenCode<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The instructions to configure OpenCode to use a Gemini Enterprise Agent Platform are under the <a href=\"https:\/\/opencode.ai\/docs\/providers\/#google-vertex-ai\">&#8220;Vertex AI&#8221; section of the providers page<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Three environmental variables (2 mandatory, 1 optional) are required:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>GOOGLE_APPLICATION_CREDENTIALS: stores the path of the Service Account JSON file<\/li>\n\n\n\n<li>GOOGLE_CLOUD_PROJECT: store the cloud project for the service account<\/li>\n\n\n\n<li>VERTEX_LOCATION (<em>optional<\/em>): The region for Vertex AI. The default is <code>global<\/code><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Set the variables with inline command execution<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">The easiest way is to launch OpenCode while setting the environmental variables:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>GOOGLE_APPLICATION_CREDENTIALS=~\/.config\/opencode\/opencode-devmachine.json GOOGLE_CLOUD_PROJECT=opencode-dev opencode<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Remember to close the <a href=\"https:\/\/opencode.ai\/docs\/server\/\">OpenCode Server<\/a> before passing the environmental vars from the command line, otherwise the existing server won&#8217;t pick them up. It fires up the first time OpenCode is launched after a system reboot, and then remains in memory.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Set the variables permanently in the shell Environment<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">For <strong>Zsh<\/strong> (macOS):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cat &lt;&lt; 'EOF' &gt;&gt; ~\/.zshrc\n\nexport GOOGLE_APPLICATION_CREDENTIALS=\"$HOME\/.config\/opencode\/opencode-devmachine.json\"\nexport GOOGLE_CLOUD_PROJECT=\"opencode-dev\"\nEOF\nsource ~\/.zshrc<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">For <strong>Bash<\/strong> (Linux):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cat &lt;&lt; 'EOF' &gt;&gt; ~\/.bashrc\n\nexport GOOGLE_APPLICATION_CREDENTIALS=\"$HOME\/.config\/opencode\/opencode-devmachine.json\"\nexport GOOGLE_CLOUD_PROJECT=\"opencode-dev\"\nEOF\nsource ~\/.bashrc<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Model selection in OpenCode<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Once OpenCode is running, type <code>\/models<\/code> and look for <strong>Gemini<\/strong> models (e.g. <code>google-vertex\/gemini-3.8-flash<\/code>)<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">When OpenCode is NOT configured to use Gemini models, the command <code>\/models<\/code> returns only the free models available by default.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"631\" height=\"422\" src=\"https:\/\/rainbowbreeze.it\/wordpress\/wp-content\/uploads\/2026\/10\/20261011-opencode_vertexai-06.png\" alt=\"\" class=\"wp-image-11160\" srcset=\"https:\/\/rainbowbreeze.it\/wordpress\/wp-content\/uploads\/2026\/10\/20261011-opencode_vertexai-06.png 631w, https:\/\/rainbowbreeze.it\/wordpress\/wp-content\/uploads\/2026\/10\/20261011-opencode_vertexai-06-300x201.png 300w, https:\/\/rainbowbreeze.it\/wordpress\/wp-content\/uploads\/2026\/10\/20261011-opencode_vertexai-06-200x134.png 200w\" sizes=\"auto, (max-width: 631px) 100vw, 631px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Once Google Vertex AI provide is configured, Gemini models (and other models available on Google Model Garden) are added to the list:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"629\" height=\"395\" src=\"https:\/\/rainbowbreeze.it\/wordpress\/wp-content\/uploads\/2026\/10\/20261011-opencode_vertexai-07.png\" alt=\"\" class=\"wp-image-11161\" srcset=\"https:\/\/rainbowbreeze.it\/wordpress\/wp-content\/uploads\/2026\/10\/20261011-opencode_vertexai-07.png 629w, https:\/\/rainbowbreeze.it\/wordpress\/wp-content\/uploads\/2026\/10\/20261011-opencode_vertexai-07-300x188.png 300w, https:\/\/rainbowbreeze.it\/wordpress\/wp-content\/uploads\/2026\/10\/20261011-opencode_vertexai-07-200x126.png 200w\" sizes=\"auto, (max-width: 629px) 100vw, 629px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Select one Gemini model and start using it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Google prohibits third-party software (such as OpenCode, Hermes Agent, OpenClaw, etc), from using consumer OAuth tokens to access Gemini API, making subscription services like Google AI Pro and Ultra non usable with them. To safely use Gemini models in third-party software, there are two legitimate options: Here are the steps to create a GCP service &hellip; <a href=\"https:\/\/rainbowbreeze.it\/wordpress\/gemini-in-opencode-via-vertex-ai\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Use Gemini in OpenCode via Vertex AI provider<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":3,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"federated","footnotes":""},"categories":[520,3],"tags":[909,896,913],"class_list":["post-11152","post","type-post","status-publish","format-standard","hentry","category-dev","category-tech","tag-hermes","tag-llm","tag-opencode"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Use Gemini in OpenCode via Vertex AI provider - Rainbowbreeze<\/title>\n<meta name=\"description\" content=\"How to use Gemini API in OpenCode via Gemini Enterprise Agent Platform (former Vertex AI)\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/rainbowbreeze.it\/wordpress\/gemini-in-opencode-via-vertex-ai\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Use Gemini in OpenCode via Vertex AI provider - Rainbowbreeze\" \/>\n<meta property=\"og:description\" content=\"How to use Gemini API in OpenCode via Gemini Enterprise Agent Platform (former Vertex AI)\" \/>\n<meta property=\"og:url\" content=\"https:\/\/rainbowbreeze.it\/wordpress\/gemini-in-opencode-via-vertex-ai\/\" \/>\n<meta property=\"og:site_name\" content=\"Rainbowbreeze\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-11T16:30:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/rainbowbreeze.it\/wordpress\/wp-content\/uploads\/2026\/10\/20261011-opencode_vertexai-01.png\" \/>\n\t<meta property=\"og:image:width\" content=\"572\" \/>\n\t<meta property=\"og:image:height\" content=\"515\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Alfredo\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@rainbowbreeze\" \/>\n<meta name=\"twitter:site\" content=\"@rainbowbreeze\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Alfredo\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/rainbowbreeze.it\\\/wordpress\\\/gemini-in-opencode-via-vertex-ai\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/rainbowbreeze.it\\\/wordpress\\\/gemini-in-opencode-via-vertex-ai\\\/\"},\"author\":{\"name\":\"Alfredo\",\"@id\":\"https:\\\/\\\/rainbowbreeze.it\\\/#\\\/schema\\\/person\\\/00e63c64a3939938a7467e3aaf54f4cf\"},\"headline\":\"Use Gemini in OpenCode via Vertex AI provider\",\"datePublished\":\"2026-10-11T16:30:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/rainbowbreeze.it\\\/wordpress\\\/gemini-in-opencode-via-vertex-ai\\\/\"},\"wordCount\":637,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/rainbowbreeze.it\\\/#\\\/schema\\\/person\\\/00e63c64a3939938a7467e3aaf54f4cf\"},\"image\":{\"@id\":\"https:\\\/\\\/rainbowbreeze.it\\\/wordpress\\\/gemini-in-opencode-via-vertex-ai\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/rainbowbreeze.it\\\/wordpress\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/20261011-opencode_vertexai-01.png\",\"keywords\":[\"Hermes\",\"LLM\",\"OpenCode\"],\"articleSection\":[\"Development\",\"Technology\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/rainbowbreeze.it\\\/wordpress\\\/gemini-in-opencode-via-vertex-ai\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/rainbowbreeze.it\\\/wordpress\\\/gemini-in-opencode-via-vertex-ai\\\/\",\"url\":\"https:\\\/\\\/rainbowbreeze.it\\\/wordpress\\\/gemini-in-opencode-via-vertex-ai\\\/\",\"name\":\"Use Gemini in OpenCode via Vertex AI provider - Rainbowbreeze\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/rainbowbreeze.it\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/rainbowbreeze.it\\\/wordpress\\\/gemini-in-opencode-via-vertex-ai\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/rainbowbreeze.it\\\/wordpress\\\/gemini-in-opencode-via-vertex-ai\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/rainbowbreeze.it\\\/wordpress\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/20261011-opencode_vertexai-01.png\",\"datePublished\":\"2026-10-11T16:30:47+00:00\",\"description\":\"How to use Gemini API in OpenCode via Gemini Enterprise Agent Platform (former Vertex AI)\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/rainbowbreeze.it\\\/wordpress\\\/gemini-in-opencode-via-vertex-ai\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/rainbowbreeze.it\\\/wordpress\\\/gemini-in-opencode-via-vertex-ai\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/rainbowbreeze.it\\\/wordpress\\\/gemini-in-opencode-via-vertex-ai\\\/#primaryimage\",\"url\":\"https:\\\/\\\/rainbowbreeze.it\\\/wordpress\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/20261011-opencode_vertexai-01.png\",\"contentUrl\":\"https:\\\/\\\/rainbowbreeze.it\\\/wordpress\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/20261011-opencode_vertexai-01.png\",\"width\":572,\"height\":515,\"caption\":\"Screen to create a new project in Google Cloud Platform\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/rainbowbreeze.it\\\/wordpress\\\/gemini-in-opencode-via-vertex-ai\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/rainbowbreeze.it\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Use Gemini in OpenCode via Vertex AI provider\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/rainbowbreeze.it\\\/#website\",\"url\":\"https:\\\/\\\/rainbowbreeze.it\\\/\",\"name\":\"Rainbowbreeze\",\"description\":\"Alfredo Morresi&#039;s digital harbor\",\"publisher\":{\"@id\":\"https:\\\/\\\/rainbowbreeze.it\\\/#\\\/schema\\\/person\\\/00e63c64a3939938a7467e3aaf54f4cf\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/rainbowbreeze.it\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/rainbowbreeze.it\\\/#\\\/schema\\\/person\\\/00e63c64a3939938a7467e3aaf54f4cf\",\"name\":\"Alfredo\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/rainbowbreeze.it\\\/wordpress\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/rainbowbreeze_profile_700px.jpg\",\"url\":\"https:\\\/\\\/rainbowbreeze.it\\\/wordpress\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/rainbowbreeze_profile_700px.jpg\",\"contentUrl\":\"https:\\\/\\\/rainbowbreeze.it\\\/wordpress\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/rainbowbreeze_profile_700px.jpg\",\"width\":700,\"height\":700,\"caption\":\"Alfredo\"},\"logo\":{\"@id\":\"https:\\\/\\\/rainbowbreeze.it\\\/wordpress\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/rainbowbreeze_profile_700px.jpg\"},\"description\":\"79ers, Italian, with a passion for creating environments in which great ideas can happen and people feel empowered, thanks to community dynamics and technological innovation. I also love nature, open-source, running on the beach, snowboarding and Tiramisu\u2019\",\"sameAs\":[\"https:\\\/\\\/rainbowbreeze.it\\\/\",\"https:\\\/\\\/www.instagram.com\\\/rainbowbreez3\\\/\",\"https:\\\/\\\/linkedin.com\\\/in\\\/alfredomorresi\",\"https:\\\/\\\/x.com\\\/rainbowbreeze\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Use Gemini in OpenCode via Vertex AI provider - Rainbowbreeze","description":"How to use Gemini API in OpenCode via Gemini Enterprise Agent Platform (former Vertex AI)","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/rainbowbreeze.it\/wordpress\/gemini-in-opencode-via-vertex-ai\/","og_locale":"en_US","og_type":"article","og_title":"Use Gemini in OpenCode via Vertex AI provider - Rainbowbreeze","og_description":"How to use Gemini API in OpenCode via Gemini Enterprise Agent Platform (former Vertex AI)","og_url":"https:\/\/rainbowbreeze.it\/wordpress\/gemini-in-opencode-via-vertex-ai\/","og_site_name":"Rainbowbreeze","article_published_time":"2026-10-11T16:30:47+00:00","og_image":[{"width":572,"height":515,"url":"https:\/\/rainbowbreeze.it\/wordpress\/wp-content\/uploads\/2026\/10\/20261011-opencode_vertexai-01.png","type":"image\/png"}],"author":"Alfredo","twitter_card":"summary_large_image","twitter_creator":"@rainbowbreeze","twitter_site":"@rainbowbreeze","twitter_misc":{"Written by":"Alfredo","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/rainbowbreeze.it\/wordpress\/gemini-in-opencode-via-vertex-ai\/#article","isPartOf":{"@id":"https:\/\/rainbowbreeze.it\/wordpress\/gemini-in-opencode-via-vertex-ai\/"},"author":{"name":"Alfredo","@id":"https:\/\/rainbowbreeze.it\/#\/schema\/person\/00e63c64a3939938a7467e3aaf54f4cf"},"headline":"Use Gemini in OpenCode via Vertex AI provider","datePublished":"2026-10-11T16:30:47+00:00","mainEntityOfPage":{"@id":"https:\/\/rainbowbreeze.it\/wordpress\/gemini-in-opencode-via-vertex-ai\/"},"wordCount":637,"commentCount":0,"publisher":{"@id":"https:\/\/rainbowbreeze.it\/#\/schema\/person\/00e63c64a3939938a7467e3aaf54f4cf"},"image":{"@id":"https:\/\/rainbowbreeze.it\/wordpress\/gemini-in-opencode-via-vertex-ai\/#primaryimage"},"thumbnailUrl":"http:\/\/rainbowbreeze.it\/wordpress\/wp-content\/uploads\/2026\/10\/20261011-opencode_vertexai-01.png","keywords":["Hermes","LLM","OpenCode"],"articleSection":["Development","Technology"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/rainbowbreeze.it\/wordpress\/gemini-in-opencode-via-vertex-ai\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/rainbowbreeze.it\/wordpress\/gemini-in-opencode-via-vertex-ai\/","url":"https:\/\/rainbowbreeze.it\/wordpress\/gemini-in-opencode-via-vertex-ai\/","name":"Use Gemini in OpenCode via Vertex AI provider - Rainbowbreeze","isPartOf":{"@id":"https:\/\/rainbowbreeze.it\/#website"},"primaryImageOfPage":{"@id":"https:\/\/rainbowbreeze.it\/wordpress\/gemini-in-opencode-via-vertex-ai\/#primaryimage"},"image":{"@id":"https:\/\/rainbowbreeze.it\/wordpress\/gemini-in-opencode-via-vertex-ai\/#primaryimage"},"thumbnailUrl":"http:\/\/rainbowbreeze.it\/wordpress\/wp-content\/uploads\/2026\/10\/20261011-opencode_vertexai-01.png","datePublished":"2026-10-11T16:30:47+00:00","description":"How to use Gemini API in OpenCode via Gemini Enterprise Agent Platform (former Vertex AI)","breadcrumb":{"@id":"https:\/\/rainbowbreeze.it\/wordpress\/gemini-in-opencode-via-vertex-ai\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/rainbowbreeze.it\/wordpress\/gemini-in-opencode-via-vertex-ai\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/rainbowbreeze.it\/wordpress\/gemini-in-opencode-via-vertex-ai\/#primaryimage","url":"https:\/\/rainbowbreeze.it\/wordpress\/wp-content\/uploads\/2026\/10\/20261011-opencode_vertexai-01.png","contentUrl":"https:\/\/rainbowbreeze.it\/wordpress\/wp-content\/uploads\/2026\/10\/20261011-opencode_vertexai-01.png","width":572,"height":515,"caption":"Screen to create a new project in Google Cloud Platform"},{"@type":"BreadcrumbList","@id":"https:\/\/rainbowbreeze.it\/wordpress\/gemini-in-opencode-via-vertex-ai\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/rainbowbreeze.it\/"},{"@type":"ListItem","position":2,"name":"Use Gemini in OpenCode via Vertex AI provider"}]},{"@type":"WebSite","@id":"https:\/\/rainbowbreeze.it\/#website","url":"https:\/\/rainbowbreeze.it\/","name":"Rainbowbreeze","description":"Alfredo Morresi&#039;s digital harbor","publisher":{"@id":"https:\/\/rainbowbreeze.it\/#\/schema\/person\/00e63c64a3939938a7467e3aaf54f4cf"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/rainbowbreeze.it\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/rainbowbreeze.it\/#\/schema\/person\/00e63c64a3939938a7467e3aaf54f4cf","name":"Alfredo","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/rainbowbreeze.it\/wordpress\/wp-content\/uploads\/2021\/03\/rainbowbreeze_profile_700px.jpg","url":"https:\/\/rainbowbreeze.it\/wordpress\/wp-content\/uploads\/2021\/03\/rainbowbreeze_profile_700px.jpg","contentUrl":"https:\/\/rainbowbreeze.it\/wordpress\/wp-content\/uploads\/2021\/03\/rainbowbreeze_profile_700px.jpg","width":700,"height":700,"caption":"Alfredo"},"logo":{"@id":"https:\/\/rainbowbreeze.it\/wordpress\/wp-content\/uploads\/2021\/03\/rainbowbreeze_profile_700px.jpg"},"description":"79ers, Italian, with a passion for creating environments in which great ideas can happen and people feel empowered, thanks to community dynamics and technological innovation. I also love nature, open-source, running on the beach, snowboarding and Tiramisu\u2019","sameAs":["https:\/\/rainbowbreeze.it\/","https:\/\/www.instagram.com\/rainbowbreez3\/","https:\/\/linkedin.com\/in\/alfredomorresi","https:\/\/x.com\/rainbowbreeze"]}]}},"_links":{"self":[{"href":"https:\/\/rainbowbreeze.it\/wordpress\/wp-json\/wp\/v2\/posts\/11152","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rainbowbreeze.it\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rainbowbreeze.it\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rainbowbreeze.it\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/rainbowbreeze.it\/wordpress\/wp-json\/wp\/v2\/comments?post=11152"}],"version-history":[{"count":0,"href":"https:\/\/rainbowbreeze.it\/wordpress\/wp-json\/wp\/v2\/posts\/11152\/revisions"}],"wp:attachment":[{"href":"https:\/\/rainbowbreeze.it\/wordpress\/wp-json\/wp\/v2\/media?parent=11152"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rainbowbreeze.it\/wordpress\/wp-json\/wp\/v2\/categories?post=11152"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rainbowbreeze.it\/wordpress\/wp-json\/wp\/v2\/tags?post=11152"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}