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

# Use Modellix LLM with DeepSeek Harness

> Add Modellix as a custom provider in DeepSeek Harness with the llm-pi-ai adapter—Web UI custom provider form or $DSH_HOME/settings.yaml—pointed at the OpenAI-compatible LLM gateway.

Configure [DeepSeek Harness](https://deepseek-harness.github.io/deepseek-harness/) to call the Modellix LLM gateway. DeepSeek Harness is a plugin-based agent harness whose `llm-pi-ai` adapter accepts a [custom provider](https://deepseek-harness.github.io/deepseek-harness/guide/providers) for any OpenAI-compatible endpoint, so Modellix needs no plugin—only configuration.

<Note>
  Modellix model IDs are `provider/name` (for example `openai/gpt-5.5`). Put the full string as each model `id` in your custom provider so DeepSeek Harness sends it unchanged in the request body. See [Models & Pricing](/llm/overview#models-and-pricing).
</Note>

## Prerequisites

* DeepSeek Harness Web UI started via the [root README](https://github.com/deepseek-ai/deepseek-harness)
* A Modellix API key from the [console](https://modellix.ai/console/api-key)—not a vendor platform key

Model changes take effect on the next request; you do not need to restart the server.

## Add Modellix as a Custom Provider

<Steps>
  <Step title="Open the Models Page">
    Open **Settings → Models**.
  </Step>

  <Step title="Add a Custom Provider">
    Choose **Add a custom provider** and fill in the form:

    | Field        | Value                                          |
    | ------------ | ---------------------------------------------- |
    | Provider ID  | `modellix` (lowercase; permanent once saved)   |
    | Display name | `Modellix`                                     |
    | Base URL     | `https://llm.modellix.ai/v1`                   |
    | API protocol | `openai-completions` (OpenAI Chat Completions) |
    | API key      | Your Modellix API key                          |

    The Provider ID is permanent because requests, saved sessions, model defaults, and credential references use it. The display name, base URL, protocol, credential, and models remain editable.

    Keys are write-only: after saving, the page shows only a redacted descriptor, and the key is stored in `$DSH_HOME/.credentials.yaml`.
  </Step>

  <Step title="Add Models">
    Under **Model catalog**, choose **Fetch available models**. Modellix serves the OpenAI-compatible `GET /v1/models` endpoint, so the form lists the current Model IDs. Select the ones you want, or enter them by hand.

    Each model `id` must be a full Modellix Model ID, for example:

    ```
    openai/gpt-5.5
    openai/gpt-5.6-sol
    anthropic/claude-sonnet-5
    google/gemini-3.6-flash
    deepseek/deepseek-v4-flash
    ```

    The provider is not stored until you save. Full catalog: [Models & Pricing](/llm/overview#models-and-pricing).
  </Step>

  <Step title="Select a Model">
    Save the provider, then choose a Modellix model in the model picker. Selecting a model also makes it the default for new sessions.
  </Step>
</Steps>

## Configure Directly in `settings.yaml`

You can declare the same provider in `$DSH_HOME/settings.yaml` instead of the form. Credentials stay out of this file—`apiKeyEnv` is a reference resolved per request (or provide the key through the Models page):

```yaml theme={null}
llm-pi-ai:
  providers:
    modellix:
      apiKeyEnv: MODELLIX_API_KEY
      api: openai-completions
      baseURL: https://llm.modellix.ai/v1
      models:
        - id: openai/gpt-5.5
          name: GPT 5.5
        - id: openai/gpt-5.6-sol
          name: GPT 5.6 Sol
        - id: anthropic/claude-sonnet-5
          name: Claude Sonnet 5
        - id: google/gemini-3.6-flash
          name: Gemini 3.6 Flash
        - id: deepseek/deepseek-v4-flash
          name: DeepSeek V4 Flash
```

| Field       | Meaning                                                                     |
| ----------- | --------------------------------------------------------------------------- |
| `apiKeyEnv` | Environment variable holding the Modellix API key                           |
| `api`       | Wire protocol; `openai-completions` for Chat Completions                    |
| `baseURL`   | `https://llm.modellix.ai/v1`                                                |
| `models`    | List of model entries; `id` is the exact Modellix Model ID sent on the wire |

The `models` list replaces the route's catalog, so every model the route should serve must appear in it—an entry with only `id` is enough. `name` is optional and shown in selectors. Add or remove entries as needed; a model the route does not configure fails with `UNKNOWN_MODEL`.

## Use the Anthropic Messages Protocol

Most setups should keep `openai-completions`: every Modellix model, including `anthropic/...`, works over Chat Completions at `https://llm.modellix.ai/v1`. If you prefer the Anthropic wire protocol, set `api: anthropic-messages` and `baseURL: https://llm.modellix.ai` (no `/v1`)—but model discovery (`Fetch available models`) only reads OpenAI-compatible `GET /models` endpoints, so enter models by hand in that case.

## Troubleshooting

| Check                              | Detail                                                                                                                 |
| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| `MISSING_CREDENTIAL`               | Store the provider key through the Models page, or provide the referenced environment variable                         |
| `UNKNOWN_MODEL`                    | Select a configured model, or add the missing model to the custom provider                                             |
| Fetch available models returns 401 | Check the key. Model discovery calls `GET /v1/models` on `https://llm.modellix.ai/v1`; enter models manually if needed |
| Request rejected with an image     | Modellix LLM is a text gateway—use text-only prompts; do not attach images                                             |

## Related

* [DeepSeek Harness providers guide](https://deepseek-harness.github.io/deepseek-harness/guide/providers) — official custom provider setup
* [Models & Pricing](/llm/overview#models-and-pricing) — Model IDs and rates
* [LLM API guide](/llm/api/api) — protocols, auth, and curl examples
* [OpenAI SDK](/llm/sdk/openai-sdk) — same `/v1` Chat Completions gateway
