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
curl -fsSL https://github.com/aaif-goose/goose/releases/download/stable/download_cli.sh | bashbrew install block-goose-cliOn 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
{
"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
}{
"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
GOOSE_PROVIDER: osarai
GOOSE_MODEL: qwen3.8-27b3. Start a session
export OSARAI_API_KEY="qck_your_key_here"
cd your-project
goose sessionbase_urlis the full Chat Completions address, including/chat/completions.api_key_envnames the variable that holds your key, so the file holds no secret.- Add one entry under
modelsfor 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:
| Prompt | Answer |
|---|---|
OPENAI_API_KEY | your qck_… key |
OPENAI_HOST | https://osarai.xyz |
OPENAI_BASE_PATH | v1/chat/completions |
| Model | qwen3.8-27b |
The same settings work as environment variables:
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
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
| Symptom | Fix |
|---|---|
| goose does not list Osarai | The file must be in custom_providers under goose's config directory, with a .json name |
401 | OSARAI_API_KEY (or the variable in api_key_env) is not set in the shell that started goose |
404 | base_url must end with /v1/chat/completions; with the OpenAI provider, OPENAI_HOST has no path |
| Keyring errors on Windows or in containers | Choose not to store the key in the keyring and use the environment variable instead |
503 … not ready yet | The instance is still starting; wait for Ready on the instance page |