Switching from Gemini API to Vertex AI Integration I have a Node.js application that formerly used the pure Gemini API. I switched to using the Vertex AI integration. In order to achieve this, you need to set up your environment to use Application Default Credentials (ADC) and specify your Google Cloud project ID. #!/bin/bash export GOOGLE_CLOUD_PROJECT=<my-project-id> bash <(curl -s SL \ https://storage.googleapis.com/cloud-samples-data/adc/setup_adc.sh) Then it stores the service credentials in a file: ${HOME} /.config/g cloud /application_default_credentials.json Which contains: { "account" : "" , "client_id" : "....apps.googleusercontent.com" , "client_secret" : "..." , "quota_project_id" : "gen-lang-client-0123456" , "refresh_token" : "1//OlP1frQqGdZVykkPbFRWzVUBo1s" , "type" : "authorized_user" , "universe_domain" : ...
Running OpenCode with a Remote Ollama Server I recently changed my local AI development setup so that OpenCode no longer runs models on the same machine where I edit code. Instead, OpenCode connects to a remote Ollama server over my local network. This approach lets me keep my development environment lightweight while dedicating another machine to model inference. Why use a remote Ollama server? Running Ollama remotely offers several advantages: The development machine remains responsive while the model generates responses. GPU resources can be centralized on a dedicated machine. Multiple computers can share the same inference server. Updating or changing models only needs to be done on one system. The OpenCode configuration remains simple. As long as the network latency is reasonable, the experience is very close to using a local Ollama instance. My OpenCode configuration OpenCode supports providers compatible with the OpenAI API. Since O...