Skip to content

DocsCoding agents

Goose

Connect the goose agent to your Osarai GPU as a custom OpenAI-compatible provider, from a provider file or goose configure.

goose is an open source agent with a CLI and a desktop app. It reaches Osarai through its OpenAI engine, over Chat Completions.

Install

Terminal
curl -fsSL https://github.com/aaif-goose/goose/releases/download/stable/download_cli.sh | bash

On Windows, run the script in Git Bash, MSYS2 or PowerShell. To skip the interactive setup at the end, put CONFIGURE=false before bash.

Configure

The cleanest setup is a custom provider file, which also tells goose the model's context window.

1. Add the provider

~/.config/goose/custom_providers/osarai.json
{
  "name": "osarai",
  "engine": "openai",
  "display_name": "Osarai",
  "description": "Your own GPU on Osarai",
  "api_key_env": "OSARAI_API_KEY",
  "base_url": "https://osarai.xyz/v1/chat/completions",
  "models": [{ "name": "qwen3.8-27b", "context_limit": 131072 }],
  "supports_streaming": true,
  "requires_auth": true
}

2. Make it the default

~/.config/goose/config.yaml
GOOSE_PROVIDER: osarai
GOOSE_MODEL: qwen3.8-27b

3. Start a session

Terminal
export OSARAI_API_KEY="qck_your_key_here"
cd your-project
goose session
  • base_url is the full Chat Completions address, including /chat/completions.
  • api_key_env names the variable that holds your key, so the file holds no secret.
  • Add one entry under models for each model you run.

Without a provider file

goose's built-in OpenAI provider also accepts a custom host. Run goose configure, choose Configure Providers → OpenAI, and answer:

PromptAnswer
OPENAI_API_KEYyour qck_… key
OPENAI_HOSThttps://osarai.xyz
OPENAI_BASE_PATHv1/chat/completions
Modelqwen3.8-27b

The same settings work as environment variables:

Terminal
export GOOSE_PROVIDER=openai
export GOOSE_MODEL=qwen3.8-27b
export OPENAI_HOST="https://osarai.xyz"
export OPENAI_BASE_PATH="v1/chat/completions"
export OPENAI_API_KEY="$OSARAI_API_KEY"

Run one task

Terminal
goose run -t "Explain what src/math.ts does"

goose run starts a session, carries out the instruction and exits, which suits scripts and CI.

Troubleshooting

SymptomFix
goose does not list OsaraiThe file must be in custom_providers under goose's config directory, with a .json name
401OSARAI_API_KEY (or the variable in api_key_env) is not set in the shell that started goose
404base_url must end with /v1/chat/completions; with the OpenAI provider, OPENAI_HOST has no path
Keyring errors on Windows or in containersChoose not to store the key in the keyring and use the environment variable instead
503 … not ready yetThe instance is still starting; wait for Ready on the instance page