# How to Configure Multiple LLM Models Under a Single Provider in DeepSeek-Reasonix Using the Models Array

> Easily configure multiple LLM models under one provider in DeepSeek-Reasonix using the models array in reasonix.toml. Streamline your setup and switch models effortlessly.

- Repository: [YHH/DeepSeek-Reasonix](https://github.com/esengine/DeepSeek-Reasonix)
- Tags: how-to-guide
- Published: 2026-08-06

---

**You can group multiple model identifiers under a single provider entry in [`reasonix.toml`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/reasonix.toml) by using the `models = [...]` array, allowing you to switch between them without duplicating credentials.**

DeepSeek-Reasonix supports declaring several LLM variants behind one provider configuration. This approach lets you define base URLs and API keys once while exposing multiple model options to the UI. The feature is driven by the `ProviderEntry` struct in [`internal/config/config.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/config/config.go), which parses the TOML and populates a dropdown menu for model selection.

## The ProviderEntry Struct Behind Multi-Model Support

The configuration logic resides in [`internal/config/config.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/config/config.go), specifically in the `ProviderEntry` struct (lines 1295–1304). This Go type defines how Reasonix interprets provider declarations from your TOML file.

Key fields for multi-model configuration include:

- **`Models []string`** – The array of model identifiers exposed under this provider.
- **`Default string`** – Specifies which model is selected automatically when the session starts.
- **`ContextWindow int`** – Sets a shared token budget applied to all models in the array unless overridden.

When Reasonix initializes, it reads the `models` slice and generates a dropdown in the UI. Switching models changes only the `model` parameter in API requests while reusing the same `base_url` and authentication credentials.

## Configuring the Models Array in reasonix.toml

To set up multiple models, declare a provider block with the `models` field containing a list of strings. Each string represents a distinct model identifier recognized by the provider's API.

### Basic Syntax

Define the provider kind, base URL, and list every model you want available:

```toml
[[providers]]
name        = "deepseek"
kind        = "openai"
base_url    = "https://api.deepseek.com"
models      = ["deepseek-v4-flash", "deepseek-v4-pro"]
api_key_env = "DEEPSEEK_API_KEY"

```

### Setting a Default Model

Use the `default` field to pre-select a specific model when Reasonix loads. If omitted, Reasonix automatically uses the first entry in the `models` array.

```toml
[[providers]]
name        = "deepseek"
models      = ["deepseek-v4-flash", "deepseek-v4-pro"]
default     = "deepseek-v4-flash"

```

### Shared Context Windows

The `context_window` field applies to all models in the array, ensuring consistent token limits across variants:

```toml
[[providers]]
name           = "deepseek"
models         = ["deepseek-v4-flash", "deepseek-v4-pro"]
context_window = 1_000_000

```

You can fine-tune individual models using `model_overrides` if specific variants require different limits.

## How Reasonix Loads Multiple Models at Runtime

When the application starts, the TOML parser populates the `ProviderEntry.Models` slice. The UI layer then renders this list as a dropdown menu, allowing you to switch contexts without editing configuration files.

According to the source code in [`internal/config/config.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/config/config.go), the runtime behavior follows this flow:

1. **Configuration Loading**: The `ProviderEntry` struct is instantiated from [`reasonix.toml`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/reasonix.toml).
2. **Model Population**: The `Models` field is populated with the string array from the TOML file.
3. **Credential Reuse**: All models share the `BaseURL` and `APIKeyEnv` defined in the parent provider entry.
4. **Default Selection**: If `default` is set, that model ID is selected; otherwise, index 0 of the `Models` slice is used.

This architecture means you can add or remove model identifiers from the array, restart Reasonix, and immediately see the changes reflected in the model selector.

## Complete Configuration Example

Here is a production-ready [`reasonix.toml`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/reasonix.toml) excerpt demonstrating a DeepSeek provider with multiple models and a designated default:

```toml
[[providers]]
name        = "deepseek"
kind        = "openai"
base_url    = "https://api.deepseek.com"
chat_url    = "/v1/chat/completions"

# Expose multiple models under this single provider

models      = ["deepseek-v4-flash", "deepseek-v4-pro", "deepseek-v4-chat"]

# Select the flash model by default for speed

default     = "deepseek-v4-flash"

api_key_env = "DEEPSEEK_API_KEY"
context_window = 1_000_000

# Optional: Override context window for the Pro variant only

# model_overrides = { "deepseek-v4-pro" = { context_window = 2_000_000 } }

```

This configuration is based on the example found in [`reasonix.example.toml`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/reasonix.example.toml) (lines 59–66), which demonstrates the recommended structure for multi-model setups.

## Summary

- **Declare multiple models** using the `models = [...]` array inside a single `[[providers]]` block in [`reasonix.toml`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/reasonix.toml).
- **Reuse credentials**—all models in the array share the same `base_url` and `api_key_env` defined in the provider entry.
- **Set a default** with the `default` field, or let Reasonix automatically select the first model in the array.
- **Reference implementation** is found in [`internal/config/config.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/config/config.go) within the `ProviderEntry` struct definition.

## Frequently Asked Questions

### What happens if I don't specify a default model?

If the `default` field is omitted, Reasonix automatically uses the first model listed in the `models` array as the default selection when the application initializes.

### Can I override settings for individual models in the array?

Yes. While `context_window` applies to all models in the provider entry, you can define `model_overrides` in the TOML to specify per-model parameters, such as different token limits for specific variants.

### How do I switch between models in the DeepSeek-Reasonix UI?

Once configured, the `models` array populates a dropdown menu in the Reasonix interface. Selecting a different option from this dropdown changes the active model for the session without requiring configuration file edits or application restarts.

### Is the models array backward compatible with single-model configurations?

Yes. The `models` field is additive; if you have existing single-model configurations using the `model` field (the legacy string field), they continue to work. However, migrating to the `models` array provides greater flexibility for future expansion.