---
title: "goose custom OpenAI-compatible provider setup | BroadRouter"
description: "Connect the goose AI agent to BroadNet Inference as an OpenAI Compatible custom provider, from goose Desktop, goose configure or a JSON file."
url: https://broadrouter.com/guides/goose-custom-provider/
lang: en
updated: 2026-11-16
publisher: BroadRouter (a BroadNet site); API by BroadNet Inference, https://inference.broadnet.ai
---

# Add BroadNet Inference to goose as a custom provider

Updated 2026-11-16

In goose, add a custom provider with type OpenAI Compatible, API URL https://inference.broadnet.ai/v1/chat/completions, your BroadNet key and available models such as broadnet/glm-5.3. Use goose Desktop's Add Custom Provider button, goose configure in the terminal, or a JSON file in ~/.config/goose/custom\_providers/. goose relies on tool calling, so start with GLM 5.3 or Qwen3.8 27B.

goose is an open-source AI agent with a desktop app and a CLI. Services that aren’t built in are added as **custom providers**, and goose supports OpenAI-compatible ones. BroadNet Inference serves standard chat completions, so it works this way. BroadRouter is BroadNet’s own site; the steps follow [goose’s provider docs](https://goose-docs.ai/docs/getting-started/providers/) as of goose 1.59.

goose’s docs warn that it “extensively uses tool calling”, and that models without it can only chat with every extension disabled. BroadNet lists tool calling for GLM 5.3 and Qwen3.8 27B, so use one of those for agent work.

## Option 1: goose Desktop

1.  Open the sidebar and click **Settings**, then the **Models** tab.
    
2.  Click **Configure providers**, then **Add Custom Provider** at the bottom.
    
3.  Fill in the details:
    
    | Field | Value |
    | --- | --- |
    | Provider Type | **OpenAI Compatible** |
    | Display Name | BroadNet Inference |
    | API URL | `https://inference.broadnet.ai/v1/chat/completions` |
    | API Key | your BroadNet key |
    | Available Models | `broadnet/glm-5.3, broadnet/qwen3.8-27b` |
    | Streaming Support | on |
    
4.  Click **Create Provider**, then select it and a model.
    

## Option 2: goose CLI

Run `goose configure`, choose **Custom Providers**, then **Add A Custom Provider**, and answer the prompts with the same values: API type OpenAI Compatible, the API URL above, authentication **Yes** with a static API key, the comma-separated model list, and streaming on.

## Option 3: a JSON file

Create `~/.config/goose/custom_providers/broadnet.json` (on Windows, `%APPDATA%\Block\goose\config\custom_providers\`):

```json
{
  "name": "broadnet",
  "engine": "openai",
  "display_name": "BroadNet Inference",
  "description": "BroadNet Inference, OpenAI-compatible",
  "api_key_env": "BROADNET_API_KEY",
  "base_url": "https://inference.broadnet.ai/v1/chat/completions",
  "models": [
    { "name": "broadnet/glm-5.3", "context_limit": 1048576 },
    { "name": "broadnet/qwen3.8-27b", "context_limit": 262144 },
    { "name": "broadnet/deepseek-v4.1-flash", "context_limit": 1048576 }
  ],
  "supports_streaming": true,
  "requires_auth": true
}
```

Then start a session with it:

```bash
export BROADNET_API_KEY='your-broadnet-key'
goose session start --provider broadnet
```

The file can go into a repository for your team, because the key stays in the environment.

## Test it

Start with a plain question, such as “what can you do?”. An answer means the connection works. Then ask for something that needs one of your enabled extensions. If goose calls the tool, tool calling works too. If it only replies with text and never calls a tool, switch to `broadnet/glm-5.3`.

## Prices in goose

goose can estimate cost if each model in the JSON file has `input_token_cost` and `output_token_cost` in USD per token. Take the numbers from BroadNet’s [pricing page](https://broadrouter.com/pricing/) and divide the per-million price by 1,000,000. Without both fields, goose falls back to its own catalogue pricing, which may not match BroadNet’s prices.

## Troubleshooting

-   **401.** The key is wrong, expired or out of allowance, or `BROADNET_API_KEY` isn’t set in the shell that starts goose.
-   **404.** Check the API URL. It should be `https://inference.broadnet.ai/v1/chat/completions`. Check the model ID matches BroadNet’s exactly. Paid models need a top-up; the $5 credit covers only `broadnet/gemma-4-26b-a4b` and the two Transcribe models, and Gemma’s 32,768-token context is small for agent work.
-   **Empty answers.** Reasoning counts toward the output limit on DeepSeek V4.1 Flash, GLM 5.3 and Qwen3.8 27B. [Why answers come back empty](https://broadrouter.com/guides/reasoning-tokens-empty-response/).
-   **429.** A pay-as-you-go key allows 30 requests a minute and 4 in flight. See [errors and retries](https://broadrouter.com/guides/errors-and-retries/).
-   **Requests wait or fail with two goose sessions on one plan key.** A [plan session](https://broadrouter.com/guides/unlimited-llm-api-sessions/) runs one request at a time, so give each goose session its own.

## Terms in this guide

[Pay-as-you-go](https://broadrouter.com/glossary/pay-as-you-go/)

Pay-as-you-go is a pricing model in which you pay only for what you use, metered per unit such as tokens, requests or audio minutes, with no subscription or minimum commitment. Most LLM APIs bill this way, from a prepaid balance or a periodic invoice.

[Tool calling](https://broadrouter.com/glossary/tool-calling/)

Tool calling, also called function calling, is an LLM API feature in which the model returns a structured request to run a function the developer has defined, with JSON arguments. The application runs the function and sends the result back; the model never runs code itself.

[API key](https://broadrouter.com/glossary/api-key/)

An API key is a secret string that identifies and authorizes a client calling an API. LLM APIs usually expect it in an Authorization: Bearer header, and anyone who holds the key can make requests that are billed to the account that owns it.

[Streaming](https://broadrouter.com/glossary/streaming/)

Streaming is a way of returning a language model response in small chunks while it is still being generated, instead of as one reply at the end. OpenAI-compatible APIs stream over server-sent events when the request sets stream to true.

[AI agent](https://broadrouter.com/glossary/agent/)

An AI agent is a system in which a language model directs its own steps toward a goal: it decides which tools to call, reads the results and repeats until it produces a final answer or hits a limit. A fixed script that calls a model at set points is usually called a workflow instead.

[Chat Completions API](https://broadrouter.com/glossary/chat-completions-api/)

The Chat Completions API is OpenAI's HTTP endpoint, POST /v1/chat/completions, that takes a model name and a list of role-tagged messages and returns the model's next message. Its request and response shape became the common format that OpenAI-compatible providers and SDKs reuse.

[Concurrency](https://broadrouter.com/glossary/concurrency/)

Concurrency is the number of requests a client has in flight at the same time. LLM APIs often cap it per key or plan, separately from requests per minute, because each open request holds GPU capacity until its response has finished.

[Prepaid credit](https://broadrouter.com/glossary/prepaid-credit/)

Prepaid credit is money added to an API account before use. Each request deducts its cost from the balance, and when the balance runs out, metered requests stop until you top up. It caps spend at what you have paid in.

## Questions

### Should the goose API URL end in /v1 or /v1/chat/completions?

goose's own custom provider example uses the full chat completions URL, so use https://inference.broadnet.ai/v1/chat/completions. That also keeps goose on chat completions, which is what BroadNet serves.

### Which BroadNet model works best with goose?

GLM 5.3 (broadnet/glm-5.3). goose's docs say it uses tool calling extensively, and BroadNet lists tools for GLM 5.3 and Qwen3.8 27B only.

### Can I use goose on the BroadNet unlimited plan?

The plans cover DeepSeek V4.1 Flash only, and BroadNet's docs don't list tool calling for it. goose says models without tool calling can only chat with extensions disabled, so test it before you buy a month.

### Where does goose keep the API key?

In the system keychain, or in secrets.yaml if the keyring is off. With a JSON file, goose reads the variable named in api\_key\_env instead.

## Related guides

-   [Use Kilo Code with BroadNet Inference (OpenAI Compatible provider)](https://broadrouter.com/guides/kilo-code-openai-compatible/)
-   [Add BroadNet Inference to opencode as a custom provider](https://broadrouter.com/guides/opencode-custom-provider/)
-   [How the unlimited LLM API plans work for agents](https://broadrouter.com/guides/unlimited-llm-api-sessions/)
-   [BroadNet Inference error codes and when to retry](https://broadrouter.com/guides/errors-and-retries/)
-   [All tools that work with BroadNet Inference](https://broadrouter.com/integrations/): SDKs, coding agents, chat UIs and automation tools, with exact settings for each

Try it on your real workload. New accounts start with $5 of credit for Gemma and transcription. DeepSeek, GLM and Qwen3.8 need a top-up.

[Get started](https://inference.broadnet.ai/account/?utm_source=broadrouter&utm_medium=referral&utm_campaign=guides-goose-custom-provider&utm_content=page-cta) ·

**Sources**

-   [goose docs, Model providers and Configure Custom Provider (checked 2026-11-15)](https://goose-docs.ai/docs/getting-started/providers/)
-   [goose on GitHub (aaif-goose/goose), v1.59.1 latest (checked 2026-11-15)](https://github.com/aaif-goose/goose)
-   [BroadNet Inference API reference (checked 2026-11-15)](https://inference.broadnet.ai/docs?utm_source=broadrouter&utm_medium=referral&utm_campaign=guides-goose-custom-provider&utm_content=sources)
