DocsEditors
Zed
Add your Osarai GPU to Zed's agent panel as an OpenAI-compatible LLM provider, with the key read from an environment variable.
Zed is a fast code editor with a built-in agent panel. It reaches Osarai as an OpenAI-compatible LLM provider over Chat Completions.
Configure
Open your settings with zed: open settings and add a provider:
{
"language_models": {
"openai_compatible": {
"osarai": {
"api_url": "https://osarai.xyz/v1",
"available_models": [
{
"name": "qwen3.8-27b",
"display_name": "Qwen3.8 27B (Osarai)",
"max_tokens": 131072,
"capabilities": {
"tools": true,
"images": false,
"parallel_tool_calls": false,
"prompt_cache_key": false
}
}
]
}
}
}
}max_tokensis the model's context window.tools: truelets the agent read, search and edit your project.- Set
imagestotrueonly if your instance takes image input (Models).
You can also add the provider without editing JSON: run agent: open settings, press Add Provider under LLM Providers, and enter the name, API URL, model id and context window.
The key
Zed reads a custom provider's key from an environment variable named after its id in upper case, plus _API_KEY. For the provider osarai that is the same variable as in the rest of these docs:
export OSARAI_API_KEY="qck_your_key_here"
zed .Start Zed from that shell, or enter the key once in the provider's settings, where Zed stores it in the system keychain. Never put the key in settings.json.
Use it
Open the agent panel, pick Qwen3.8 27B (Osarai) in the model selector, and ask for a change. Zed's agent uses tools to read and edit files; review its edits before you accept them.
Troubleshooting
| Symptom | Fix |
|---|---|
| The model is not in the selector | Check the JSON (Zed underlines errors) and that available_models lists it |
401 | OSARAI_API_KEY was not set in the shell that started Zed; set it and restart Zed, or enter the key in the provider settings |
| The agent never edits files | Set "tools": true and 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 |