BroadRouter
Get started

Add BroadNet Inference to goose as a custom provider

Updated

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 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\):

{
  "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:

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 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.
  • 429. A pay-as-you-go key allows 30 requests a minute and 4 in flight. See errors and retries.
  • Requests wait or fail with two goose sessions on one plan key. A plan session runs one request at a time, so give each goose session its own.

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.

Read as MarkdownAsk ChatGPTAsk ClaudeAsk Perplexity