> ## Documentation Index
> Fetch the complete documentation index at: https://a5eb32f-docs-2.manicule.dev/llms.txt
> Use this file to discover all available pages before exploring further.
> For every page in one file, fetch https://a5eb32f-docs-2.manicule.dev/llms-full.txt (large).
> To search and read these docs as tools, connect the MCP server at https://a5eb32f-docs-2.manicule.dev/api/mcp.
> Every agent surface: https://a5eb32f-docs-2.manicule.dev/.well-known/llms-manifest.json

# Configure a Model (/getting-started/models)

<!-- agent-signals: reading_time_min: 2 · est_tokens: 901 · updated: 2026-11-25 -->
Related: [Open an Existing Project](/getting-started/import-projects.md), [Install BhaiCode Desktop](/getting-started/installation.md), [Build and Deploy Your First App](/getting-started/quickstart.md), [Choose a Cloud Studio Starter](/getting-started/templates.md)

> Connect your own provider key or a local Ollama model to the Desktop Workspace, and understand how Cloud Studio routes models.

The Desktop Workspace ships without a model attached. You either bring a provider key or point it at a model running on your own machine. Cloud Studio is different: it routes requests for you and needs no key.

## Desktop Workspace

### Bring your own key

1. Open **Settings → Models** in the desktop app.
2. Pick a provider: **OpenAI**, **Anthropic**, or **Google Gemini**.
3. Paste the API key and save.
4. Pick a default model from the provider's catalog.

Keys are written to your operating system's keychain — Windows Credential Manager, macOS Keychain, or Linux Secret Service — never to a plaintext config file. Requests leave your machine directly for that provider; nothing proxies through BhaiCode.

<Tip>Pair a fast model with your daily edits and switch to a larger one for multi-file refactors. Switching costs nothing but a new request.</Tip>

### Run a local model with Ollama

Local models keep the entire loop on your machine: no key, no egress.

1. Install [Ollama](https://ollama.com) and pull a model, for example `ollama pull qwen2.5-coder`.
2. Confirm the server answers:

```sh title="Terminal"
curl http://localhost:11434/api/tags
```

3. In **Settings → Models**, choose **Ollama** and leave the endpoint at `http://localhost:11434`.
4. Select the pulled model as your default.

```text title="Expected"
{"models":[{"name":"qwen2.5-coder:latest","modified_at":"...","size":4683087360}]}
```

If the request fails, Ollama is not running or is bound to a different port. Start it with `ollama serve` and retry.

### What gets sent

Only the context a step names reaches the model: the files a tool call reads, the diff under review, and your prompt. Bulk workspace uploads do not happen. `.gitignore` is not applied automatically, so do not attach files that hold secrets. See [Privacy and retention](/security/privacy).

## Cloud Studio

Cloud Studio requires no key. Sign in at [app.bhaico.de](https://app.bhaico.de), and the workspace routes each request to a suitable model — quick edits to a fast model, architectural work to a stronger one.

<Note>BhaiCode does not claim zero-data-retention for every route. Hosted free-tier requests may reach providers without a ZDR agreement, while paid and enterprise routes prefer providers that offer one. Bring-your-own-key on Desktop sidesteps the question entirely: your provider, your terms.</Note>

## Troubleshooting a key

| Symptom                   | Cause                                                    | Fix                                                         |
| ------------------------- | -------------------------------------------------------- | ----------------------------------------------------------- |
| `401` on save             | Key revoked, or wrong project key                        | Regenerate the key at the provider and re-enter it          |
| `403` on the first prompt | Key lacks access to the selected model                   | Pick another model, or upgrade the provider tier            |
| `429` mid-task            | Provider rate limit                                      | Wait for the window to reset, or switch model for that task |
| Requests time out         | Corporate proxy or firewall blocking the provider domain | Allow the provider's API hostname on your network           |

## Next

* [Desktop Workspace overview](/desktop/overview)
* [Trust and security](/security/privacy)
* [Install the Desktop Workspace](/getting-started/installation)
