Goose¶
Add Vidai to Goose as a custom provider and every call it makes is governed: checked against your policies, charged to your team and recorded in Request logs. Goose reaches the gateway in the OpenAI format, and the gateway translates that format to every provider, so Goose can work with Claude or Gemini models as well as GPT.
What it is¶
Goose is an open-source AI agent from Block, as a desktop app and a CLI. It reads and edits files, runs commands and uses extensions (MCP servers), asking a model what to do next at each step. A custom provider appears in Goose's provider list next to the built-in ones, in Desktop and the CLI alike. Goose calls the gateway from your machine.
The settings¶
Settings › Models › Configure providers › Add Custom Provider:
| Field | Value |
|---|---|
| Provider Type | OpenAI Compatible |
| Display Name | Vidai |
| API URL | https://<your-gateway>/v1/chat/completions |
| API Key | Your Vidai key (starts vk_) |
| Available Models | The names you'll use, comma-separated: gpt-4.1, claude-sonnet-4.5, gemini-3.5-flash |
| Streaming Support | On |
Click Create Provider, then choose Vidai and a model.
goose configure
Choose Custom Providers › Add A Custom Provider, then answer the prompts with the values in the Desktop tab:
API Type OpenAI Compatible, API URL https://<your-gateway>/v1/chat/completions, a static API key (your
Vidai key), the models, and streaming on.
Create ~/.config/goose/custom_providers/vidai.json (on Windows,
%APPDATA%\Block\goose\config\custom_providers\vidai.json):
{
"name": "vidai",
"engine": "openai",
"display_name": "Vidai",
"description": "Governed AI calls through the Vidai gateway",
"api_key_env": "VIDAI_API_KEY",
"base_url": "https://<your-gateway>/v1/chat/completions",
"models": [
{ "name": "gpt-4.1", "context_limit": 1047576 },
{ "name": "claude-sonnet-4.5", "context_limit": 200000 }
],
"supports_streaming": true,
"requires_auth": true
}
Then set the key in your shell:
export VIDAI_API_KEY="vk_…"
A file like this can be checked into a repository or handed round, so a whole team gets the same provider; each person sets their own key.
The API URL is the full address of Chat Completions, https://<your-gateway>/v1/chat/completions, not only the
gateway's address: Goose's custom providers take the whole path. Goose sends the key as Authorization: Bearer.
The gateway's address is under Connect your app on the Keys page and in System › Settings › Gateway; the
key comes from Keys › Issue a key (its secret is shown once). The key starts vk_; never use a provider's key.
Without a custom provider¶
Goose's built-in providers also take another address, through environment variables:
| Provider | Variables |
|---|---|
| OpenAI | GOOSE_PROVIDER=openai, OPENAI_HOST=https://<your-gateway> (no path), OPENAI_BASE_PATH=v1/chat/completions, OPENAI_API_KEY=vk_… |
| Anthropic | GOOSE_PROVIDER=anthropic, ANTHROPIC_HOST=https://<your-gateway> (no path), ANTHROPIC_API_KEY=vk_… |
Set GOOSE_MODEL to the model's name. A custom provider is easier to tell apart in the list, and keeps the built-in
providers free for anything else.
A minimal call¶
export VIDAI_API_KEY="vk_…"
goose run --provider vidai --model gpt-4.1 -t "Reply with exactly: ok"
Streaming¶
With Streaming Support on, Goose streams every step. A stream from Claude or Gemini arrives as OpenAI chunks; Vidai records tokens and cost either way.
Tool calls¶
Goose works through tool calls: its own tools and every extension's. They work across providers: an OpenAI-format tool call reaches Claude or Gemini, and the answer comes back in the shape Goose expects. Use a model that is good at tool use; small models tend to stall on long tasks.
Reading what the gateway did¶
Goose doesn't show response headers. Look the calls up in Request logs: filter on Key, Model or Path
(/v1/chat/completions). One task usually shows as many calls, one per step.
Errors¶
Goose shows the gateway's error message. Common ones while setting up: 401 invalid_api_key (the key is wrong,
unset, or a provider's key), 403 model_not_allowed (your key may not call that model), 404 model_not_found (check
the model name) or a plain 404 (check that the API URL ends in /v1/chat/completions), 403
content_guardrail_blocked (a guardrail stopped the content), 429 (a limit on the key or team). The full list is in
Headers and errors.
Model names¶
Use the names your organisation approved under Models in the Control room, in Available Models or the file's
models. GET https://<your-gateway>/v1/models with your key lists exactly the models it may call. Give each model its
context_limit, so Goose knows when to summarise a long session.
What goes through the gateway¶
| Goose feature | Through the gateway |
|---|---|
Every step of a session or a goose run, Desktop and CLI |
Yes |
| Recipes and scheduled runs that use the Vidai provider | Yes |
| Extensions (MCP servers) | The model calls that use their tools, yes; the extensions themselves are reached directly by Goose |
Check it works in a minute¶
Run the minimal call above, then open Request logs a few seconds later and filter on your key: the call is there, with its model, its team and its cost.
Good to know¶
- Goose's own cost figures come from its catalogue or the prices you give a model in the file; Vidai prices every call itself, in Request logs.
- Autonomous tasks are chatty: set a limit on the key (or the team's budget) so a runaway task stops at a known cost.
- Issue one key per developer, so Request logs and cost reports show whose Goose made each call.
- Goose's docs: Supported LLM providers (Configure Custom Provider).