DocsCoding agents
Crush
Use Charm's Crush coding agent with your Osarai GPU as an OpenAI-compatible provider, from crush.json or a crushrc file.
Crush is Charm's coding agent for the terminal. It reaches Osarai as an OpenAI-compatible provider over Chat Completions.

Install
Terminal
npm install -g @charmland/crushTerminal
brew install charmbracelet/tap/crushTerminal
go install github.com/charmbracelet/crush@latestConfigure
Crush reads JSON (crush.json) or a crushrc file of commands. Both live in its config directory; crush dirs prints where that is (~/.config/crush on macOS and Linux). A crush.json in your project applies to that project only.
~/.config/crush/crush.json
{
"$schema": "https://charm.land/crush.json",
"providers": {
"osarai": {
"type": "openai-compat",
"name": "Osarai",
"base_url": "https://osarai.xyz/v1",
"api_key": "$OSARAI_API_KEY",
"models": [
{
"id": "qwen3.8-27b",
"name": "Qwen3.8 27B (Osarai)",
"context_window": 131072,
"default_max_tokens": 16384,
"can_reason": true
}
]
}
},
"models": {
"large": { "provider": "osarai", "model": "qwen3.8-27b" },
"small": { "provider": "osarai", "model": "qwen3.8-27b" }
}
}~/.config/crush/crushrc
provider add osarai --type completions \
--base-url "https://osarai.xyz/v1" \
--api-key "$OSARAI_API_KEY"
model add osarai/qwen3.8-27b \
--name "Qwen3.8 27B (Osarai)" \
--context-window 131072 \
--default-max-tokens 16384
# Use it for everything.
model large osarai/qwen3.8-27b
model small osarai/qwen3.8-27b$OSARAI_API_KEYis read from your environment when Crush starts, so the file holds no secret.largeis the model for the main work,smallthe one for titles and summaries. One instance serves both.context_windowtells Crush when to summarise the session; set it to your instance's context window.
Run
Terminal
export OSARAI_API_KEY="qck_your_key_here"
cd your-project
crushSwitch models with Ctrl+P → Switch model. To run one prompt without the interface:
Terminal
crush run "Explain what src/math.ts does"Crush asks before it runs commands or writes files; crush -y skips those prompts, so use it only in a sandbox.
Troubleshooting
| Symptom | Fix |
|---|---|
| Crush opens the provider picker | It did not find the config: check crush dirs and the file name |
401 | OSARAI_API_KEY is not set in the shell that started Crush |
| The model never calls tools | Use a model with tool calls (qwen3.8-27b) |
503 … not ready yet | The instance is still starting; wait for Ready on the instance page |