> ## Documentation Index
> Fetch the complete documentation index at: https://docs.naga.ac/llms.txt
> Use this file to discover all available pages before exploring further.

# goose

> Add NagaAI to goose as a custom provider on the Responses API, with one JSON file and a live model list from /v1/models.

[goose](https://github.com/aaif-goose/goose) loads extra providers from JSON files in its `custom_providers` directory, so NagaAI needs no plugin and no goose release. The file on this page adds NagaAI as the `nagaai` provider: goose sends its requests to the NagaAI Responses API, streamed, and fills the model picker from `/v1/models`. The setup follows the goose docs on [configuring a custom provider](https://goose-docs.ai/docs/getting-started/providers#configure-custom-provider).

## Before you start

You need a NagaAI [API key](https://naga.ac/dashboard/api-keys) and goose Desktop or the goose command-line tool installed.

## Connect goose

**1. Save the key**

Export the key in the shell that starts goose, or add the line to your shell profile:

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-dimmed"}}
export NAGA_API_KEY="ng-your-key"
```

The file names this variable in `api_key_env`, so the key itself stays out of the file.

**2. Download the provider file**

On macOS and Linux:

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-dimmed"}}
mkdir -p ~/.config/goose/custom_providers
curl -fsSL https://docs.naga.ac/static/integrations/goose/nagaai.json \
  -o ~/.config/goose/custom_providers/nagaai.json
```

On Windows, in PowerShell:

```text theme={"theme":{"light":"github-light-default","dark":"github-dark-dimmed"}}
New-Item -ItemType Directory -Force "$env:APPDATA\Block\goose\config\custom_providers" | Out-Null
Invoke-WebRequest https://docs.naga.ac/static/integrations/goose/nagaai.json -OutFile "$env:APPDATA\Block\goose\config\custom_providers\nagaai.json"
```

The file sets `engine` to `openai`, reads the key from `NAGA_API_KEY`, and lists five models with their context windows: `anthropic/claude-sonnet-5.5`, `anthropic/claude-opus-5.5`, `openai/gpt-6.1-sol`, `deepseek/deepseek-v4-pro` and `minimax/minimax-m3.1-flash`. With `dynamic_models` set to `true`, goose also loads every other model from the catalog.

Its `base_url` is `https://api.naga.ac/v1` and its `base_path` is `v1/responses`, so goose sends every request to `POST /v1/responses`, and goose reads the model list from `GET /v1/models` on the same host. goose sends the `x-naga-supported-endpoint` header with every request: on `/v1/models` it limits the list to the models the Responses endpoint serves, and the other endpoints ignore it.

**3. Pick the provider**

Restart goose and choose **NagaAI** in the provider list. In goose Desktop, open **Settings** > **Models** > **Configure providers**. In a terminal, run `goose configure` and choose **Configure Providers**. To keep the key in the goose keychain instead of the environment, enter it in the provider's settings in goose Desktop.

**4. Check the connection**

Send one prompt:

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-dimmed"}}
GOOSE_PROVIDER=nagaai GOOSE_MODEL=anthropic/claude-sonnet-5.5 goose run -t "Reply with the word ready."
```

The answer comes from `anthropic/claude-sonnet-5.5` on NagaAI.

## Context windows and costs

goose takes a model's context window from `context_limit` in `models`. For a model that isn't in the file, goose looks the id up in its own model catalog and, if it doesn't find it, uses a 128,000-token window. To give another model its full window, add an entry with the value from `limits.context_window` of the model's `chat` operation in [`/v1/models`](https://docs.naga.ac/get-started/models).

The file carries no prices, so the costs goose shows come from its own catalog and are estimates. What each request cost is in [Logs](https://docs.naga.ac/account/balance-and-activity.md) in your dashboard.

## Troubleshooting

### NagaAI is missing from the provider list

goose didn't load the file. Check that it's named `nagaai.json`, sits in the `custom_providers` directory for your system, and is valid JSON. goose also skips the provider when `NAGA_API_KEY` isn't set. Set the key and restart goose.

### The model picker shows only five models

goose couldn't read `/v1/models` and fell back to the models in the file. Check that the file holds `"base_url": "https://api.naga.ac/v1"` and `"base_path": "v1/responses"`, then restart goose.

### 401 `invalid_api_key`

goose sent no key or a wrong one. Check that `NAGA_API_KEY` holds an API key from the dashboard.

### 400 `model_not_found`

No model has this id, or the model doesn't serve the Responses API. Pick a model from the list goose shows, or copy an id from `GET /v1/models` with the `x-naga-supported-endpoint: responses` header.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.