Use Goose with the Gateway¶
Goose is an open-source AI agent that automates coding tasks from your terminal or desktop. Connect it to the Gateway to run Goose through your regional endpoint with full data residency and budget controls.
Prerequisites¶
- Goose installed (installation guide)
- An LLM API key and endpoint from my.amazee.io
Option 1 — Use the built-in OpenAI provider¶
Goose's built-in OpenAI provider supports custom endpoints, so you can point it directly at the Gateway.
Goose Desktop¶
- Open Settings → Models → Configure providers
- Find OpenAI and click Configure
- Fill in:
| Field | Value |
|---|---|
| OpenAI API Key | your LLM API key |
| OpenAI Host | https://llm.[your-region].amazee.ai |
| OpenAI Base Path | v1/chat/completions (default) |
- Save, then pick a model from the list (for example
claude-4-5-sonnet)
Goose CLI¶
Run the configuration command:
goose configure
- Select Configure Providers, then OpenAI. On a first run, Goose shows a setup wizard instead: choose Manual Configuration, then Search all providers..., type
OpenAIand select it. - Answer Yes to Would you like to set OPENAI_API_KEY?, then paste your LLM API key
- When asked Would you like to configure advanced settings?, answer Yes
- Leave
OPENAI_BASE_URLempty - Set
OPENAI_HOSTtohttps://llm.[your-region].amazee.ai - Keep
OPENAI_BASE_PATHasv1/chat/completions - Press Enter to skip
OPENAI_ORGANIZATIONandOPENAI_PROJECT. When asked Would you like to set OPENAI_CUSTOM_HEADERS?, answer No (it defaults to Yes, and an empty value isn't accepted). Press Enter to keep the defaultOPENAI_TIMEOUT. - Goose loads the model list from the Gateway. Type
claude-4-5-sonnetto filter the list, then select it.
Answer Yes to advanced settings
The advanced settings prompt defaults to No. The host setting is behind it. If you skip it, Goose keeps the default host and sends your key to api.openai.com.
Replace [your-region] with your region code (e.g. ch103, us103).
Option 2 — Add a custom provider¶
Custom providers let you give the connection a friendly name (e.g. "Gateway") and store a list of preferred models. This is useful if you switch between multiple endpoints.
Goose CLI¶
goose configure
- Select Custom Providers, then Add A Custom Provider
- Answer the prompts:
| Prompt | Value |
|---|---|
| What type of API is this? | OpenAI Compatible |
| What should we call this provider? | amazee.ai (or any display name) |
| Provider API URL | https://llm.[your-region].amazee.ai/v1 |
| Does this provider require authentication? | Yes |
| How should goose obtain credentials? | Static API key |
| API key | your LLM API key |
| Available models | claude-4-5-sonnet, claude-4-5-haiku |
| Supports streaming? | Yes |
| API base path | leave empty |
Config file¶
You can also create the provider config file directly. Save this as ~/.config/goose/custom_providers/amazeeai.json (macOS/Linux) or %APPDATA%\Block\goose\config\custom_providers\amazeeai.json (Windows):
{
"name": "amazeeai",
"engine": "openai",
"display_name": "amazee.ai",
"description": "amazee.ai regional AI gateway",
"api_key_env": "AMAZEEAI_API_KEY",
"base_url": "https://llm.[your-region].amazee.ai/v1",
"models": [
{ "name": "claude-4-5-sonnet", "context_limit": 200000 },
{ "name": "claude-4-5-haiku", "context_limit": 200000 },
{ "name": "claude-4-5-opus", "context_limit": 200000 }
]
}
Each entry in models must be an object with a name. If you use plain strings, Goose skips the whole file without telling you.
Then set your API key as an environment variable in your shell profile (~/.zshrc, ~/.bashrc):
export AMAZEEAI_API_KEY="your-api-key-here"
Then run Goose with the provider:
goose run --provider amazeeai --model claude-4-5-sonnet -t "list the files in this directory"
Verify¶
Start a Goose session and give it a simple task:
goose
goose> list the files in this directory
Check the My usage card on the AI keys page to confirm requests are flowing through your regional endpoint.
Troubleshooting¶
- Auth errors
- Verify your API key is correct. For Option 1, check that
OPENAI_API_KEYis set. For Option 2, check the environment variable named inapi_key_envis exported. Unknown provider: amazeeai(mentions the keychain)- Goose couldn't parse your custom provider file. The keychain is not the problem. Look in
~/.local/state/goose/logs/forFailed to parse. Usuallymodelsis a list of strings instead of{ "name": ... }objects, ornameorengineis missing. - Model not found or 403
team_model_access_denied - The model ID doesn't exist or isn't enabled for your key. Run
curl https://llm.[your-region].amazee.ai/v1/models -H "Authorization: Bearer $AMAZEEAI_API_KEY"and copy an ID from the list. - Connection errors
- For Option 1, check that
OPENAI_HOSTis set to your Gateway URL and notapi.openai.com. Make sure the host URL includes your region code and useshttps://. For the custom provider config, thebase_urlshould end with/v1. - Tool calling not working
- Goose relies on tool calling support. Use Claude models (Sonnet, Haiku, Opus) which have full tool calling support through the Gateway.