Skip to content
VS Code extensionRuns on local modelsMIT

Cloud models

Use Hugging Face, Groq, Google AI Studio or any OpenAI-compatible endpoint. Storing the key safely, choosing a tool-calling model, and why free tiers run out sooner than they look.

On this page

Every cloud provider below speaks the OpenAI-compatible API, so setup is always the same three things: a base URL, a key, and a model that supports tool calling.

Check the data policy first

A cloud endpoint receives every file the agent reads. Free tiers often carry weaker guarantees than paid ones, and some providers may train on requests. For client code, a local model avoids the question.

Hugging Face

The Inference Providers router puts hundreds of open models behind one endpoint, billed through one token. It is the extension's default cloud endpoint.

Create a token

  1. Open Access Tokens → New token. That link pre-selects the right options.
  2. Tick Make calls to Inference Providers. That is the only permission the agent needs; leave repository access off.
  3. Create the token and copy it (it starts with hf_). Hugging Face shows it once.

Store it in VS Code

Run GBS Agent: Set API Key from the Command Palette (Ctrl+Shift+P) and paste it.

The key goes into VS Code's secret storage, never into settings.json or the repository. It is bound to the endpoint it was saved for: point the extension at a different host and it asks before sending the key there.

If no key is stored, the agent falls back to the HF_TOKEN or OPENAI_API_KEY environment variables, which suits a shared build machine where you do not want a key stored at all.

Point the extension at the router

SettingValue
gbsAgent.provideropenai
gbsAgent.openai.baseUrlhttps://router.huggingface.co/v1 (the default)

Or open the model chip and choose OpenAI-compatible.

Choose a model

With a key saved, the model chip lists what the router is serving. You can also type an id, such as openai/gpt-oss-120b. The model must support tool calling.

A suffix on the id controls routing:

SuffixEffect
(none) or :fastestThe provider with the highest throughput (default)
:cheapestThe lowest price per output token
:preferredYour order from Inference Provider settings
:groq, :together, :fireworks-ai, …One specific provider

There is a free tier with monthly credits, and provider rates carry no markup. The context meter counts tokens, not money; check spend on the Hugging Face billing page.

Groq

Groq serves open models very fast and has the most usable free tier for agent work.

  1. Create a key at console.groq.com/keys.
  2. Set gbsAgent.openai.baseUrl to https://api.groq.com/openai/v1.
  3. Run GBS Agent: Set API Key and paste the key.
  4. Pick a tool-calling model in the chip. openai/gpt-oss-120b is a good default.

Google AI Studio (Gemini)

Gemini's Flash models are strong at tool calling and have the largest context of the free options.

  1. Create a key at aistudio.google.com/apikey.
  2. Set gbsAgent.openai.baseUrl to https://generativelanguage.googleapis.com/v1beta/openai/.
  3. Run GBS Agent: Set API Key and paste the key.
  4. Pick a Flash-class model, for example gemini-2.5-flash.

Any other endpoint

OpenRouter, Together, Cerebras, Azure OpenAI and company gateways all work the same way: set gbsAgent.openai.baseUrl to the provider's /v1 URL, run GBS Agent: Set API Key, and pick a tool-calling model.

How free tiers run out

Free tiers are advertised in tokens, but an agent runs out of requests first. One instruction becomes many model calls: three to eight for a small edit, twenty to sixty for a refactor that uses subagents.

EndpointRequests per minuteRequests per dayRoughly
Groq~30~1,00030–100 tasks a day
Google AI Studio~10–15~25010–30 tasks a day
Hugging Face routervaries by providercredit-baseduntil the credits run out
Ollama cloud modelsaccount limitsaccount limits
Local modelsunlimitedunlimited

Limits change; these were correct when written. A per-minute cap below about ten makes the agent feel stalled rather than slow.

A busy endpoint does not end the turn. A 429 or a gateway 5xx is retried three times with growing waits, honouring the server's Retry-After up to a minute, and the status line shows the wait (Esc cancels it).

The first time the agent would send code to a remote endpoint, it asks for confirmation, once per destination. From then on the model chip carries a cloud badge.

After changing gbsAgent.openai.baseUrl, run GBS Agent: Set API Key again: the saved key is bound to the old endpoint and will not be sent to the new one.