> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lukan.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Providers

> Configure model providers and API keys.

Lukan supports multiple model providers. All providers implement a common `Provider` interface returning `AsyncIterable<StreamEvent>`.

## Available Providers

| Provider          | ID                  | Default Model                            | Auth                                                    |
| ----------------- | ------------------- | ---------------------------------------- | ------------------------------------------------------- |
| Nebius            | `nebius`            | `MiniMaxAI/MiniMax-M2.1`                 | `NEBIUS_API_KEY` env or `nebiusApiKey`                  |
| Anthropic         | `anthropic`         | `claude-sonnet-4-5-20250929`             | `ANTHROPIC_API_KEY` or `anthropicApiKey`                |
| Fireworks         | `fireworks`         | `accounts/fireworks/models/minimax-m2p5` | `FIREWORKS_API_KEY` or `fireworksApiKey`                |
| GitHub Copilot    | `github-copilot`    | `claude-sonnet-4.5`                      | `lukan copilot-auth`                                    |
| OpenAI Codex      | `openai-codex`      | `gpt-5.3-codex`                          | `lukan codex-auth`                                      |
| z.ai              | `zai`               | `glm-5`                                  | `ZAI_API_KEY` or `zaiApiKey`                            |
| Ollama Cloud      | `ollama-cloud`      | Fetched from API                         | `OLLAMA_CLOUD_API_KEY` or `ollamaCloudApiKey`           |
| OpenAI Compatible | `openai-compatible` | Fetched from endpoint                    | `OPENAI_COMPATIBLE_API_KEY` or `openaiCompatibleApiKey` |
| Lukan Cloud       | `lukan-cloud`       | Inherited from Anthropic                 | Managed by Lukan Cloud account                          |

## Setting Up a Provider

### Interactive Setup

```bash theme={null}
lukan setup
```

This interactive wizard helps you select a provider and enter your API key.

### Manual Configuration

1. Set the API key via environment variable:
   ```bash theme={null}
   export NEBIUS_API_KEY="your-key-here"
   ```

2. Or add it to `~/.config/lukan/credentials.json`:
   ```json theme={null}
   {
     "nebiusApiKey": "your-key-here"
   }
   ```

Credentials are read from environment variables first, then from `~/.config/lukan/credentials.json`.

## Selecting Models

```bash theme={null}
# List available models
lukan models

# Select a specific model
lukan models nebius MiniMaxAI/MiniMax-M2.1
```

You can also specify the provider and model directly:

```bash theme={null}
lukan --provider nebius --model MiniMaxAI/MiniMax-M2.1
```

## Per-Channel Configuration

You can override the provider per-channel (WhatsApp, Email) in `config.json`:

```json theme={null}
{
  "whatsapp": {
    "provider": "anthropic",
    "model": "claude-sonnet-4-5-20250929"
  },
  "email": {
    "provider": "nebius",
    "model": "MiniMaxAI/MiniMax-M2.1"
  }
}
```

## OAuth Authentication

### GitHub Copilot

```bash theme={null}
lukan copilot-auth
```

This initiates an OAuth device flow to authenticate with GitHub.

### OpenAI Codex

```bash theme={null}
lukan codex-auth
```

This initiates OAuth authentication with OpenAI Codex.

## Ollama Cloud

Ollama Cloud fetches models dynamically from `https://ollama.com/api/tags`. Vision-capable models are detected automatically (patterns: vision, -vl, multimodal, llava, llama-4).

```bash theme={null}
lukan --provider ollama-cloud --model <model-name>
```

## OpenAI Compatible

Generic provider for any OpenAI-compatible endpoint (vLLM, Ollama local, LM Studio, etc.). Requires a base URL:

```json theme={null}
{
  "openaiCompatibleBaseURL": "http://localhost:11434/v1",
  "openaiCompatibleProviderName": "My Local LLM",
  "provider": "openai-compatible"
}
```

Models are fetched dynamically from the `/models` endpoint. The API key is optional.

## Lukan Cloud

<Note>
  Lukan Cloud is coming soon. All models, one API key, usage dashboard — no need to manage multiple provider keys.
</Note>
