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

> ## Agent Instructions
> Phaseo Gateway base URL: https://api.phaseo.app/v1. Send `Authorization: Bearer $PHASEO_API_KEY` with every request.
> Model IDs look like `provider/model`, for example `openai/gpt-6-astra`. Do not guess IDs: list them with `GET /v1/models` or check https://phaseo.app/models. `phaseo/free` routes to an available free model and needs no wallet balance.
> For new text integrations prefer `POST /v1/responses`. `POST /v1/chat/completions` (OpenAI format) and `POST /v1/messages` (Anthropic format) suit existing code.
> The full API contract is https://phaseo.app/docs/openapi/v1/openapi.yaml. Official SDKs: `@phaseo/sdk` (TypeScript) and `phaseo` (Python), plus Go, C#, PHP, Ruby and Rust.
> Search these docs over MCP at https://phaseo.app/docs/mcp, and install Phaseo skills with `npx skills add https://phaseo.app/docs`. If a page is wrong or out of date, report it with the MCP `submit_feedback` tool.
> Manage Phaseo accounts with the `phaseo` CLI (`npm install -g @phaseo/cli`, then `phaseo login` or `phaseo login --device-code`), the `/v1` Management API or the MCP server at `https://mcp.phaseo.app/mcp?access=manage`. Do not send users to the dashboard for account tasks. A person is still needed for sign-up, approving a sign-in, paying the first top-up on the checkout link that `phaseo credits add` returns when no card is saved, confirming each saved-card top-up from the emailed link, and account security (password, MFA, passkeys). Create API keys with `phaseo keys create --name <name> --json`; never guess one. Credit top-ups need `phaseo login --scopes billing:write` first. Task map: https://phaseo.app/docs/v1/developers/manage-from-an-agent.md.

# DeepSeek Harness

> Add Phaseo as a custom OpenAI-compatible provider in DeepSeek Harness.

Connect DeepSeek Harness to Phaseo to use Phaseo models and routing through the Harness web interface. No custom adapter is required: Harness can send OpenAI-compatible Chat Completions requests directly to Phaseo.

**Outcome:** Phaseo appears as a provider in the Harness model picker, and new Harness sessions can use a model served by Phaseo.

## Prerequisites

* Phaseo CLI, a Phaseo account, and an installed DeepSeek Harness release

The live request in this guide uses provider credentials and may incur model usage charges.

## Set up with the Phaseo CLI

Configure the provider, base URL, protocol, model catalog, and default model in one command:

```bash theme={null}
phaseo login
phaseo deepseek-harness
```

The CLI preserves unrelated entries in `$DSH_HOME/cordis.patch.yml` and marks the Phaseo block so it can update or remove only the settings it owns. It syncs every active Phaseo text model compatible with Chat Completions. Use a different default model when needed:

```bash theme={null}
phaseo deepseek-harness --model YOUR_PHASEO_MODEL_ID
```

Setup also creates a gateway key named `Phaseo CLI: DeepSeek Harness API Key`, which expires after 90 days and has a $100 monthly spend limit, and writes it directly to Harness's protected `$DSH\_HOME/.credentials.yaml`store. Run`phaseo deepseek-harness`again to replace an expired key. Use`--catalog default\` to configure only the selected model.

Removing the integration with `phaseo integrations remove deepseek-harness` removes only Phaseo-owned configuration and revokes the CLI-created key.

## Add Phaseo manually in the Harness UI

1. In DeepSeek Harness, open **Settings > Models**.
2. Choose **Add a custom provider**.
3. Enter these values:

| Field | Value |
| - | - |
| Provider ID | `phaseo` |
| Display name | `Phaseo` |
| Base URL | `https://api.phaseo.app/v1` |
| API protocol | `OpenAI Completions` |
| API key | Your Phaseo API key |

4. Under **Model catalog**, choose **Fetch available models**.
5. Select a Chat Completions model with tool support, such as `anthropic/claude-sonnet-4.6`, then save the provider.
6. Return to the composer, choose the Phaseo model, and start a new session.

Harness keeps the provider ID in saved sessions and credential references, so treat `phaseo` as permanent. The display name, URL, credential, and model list can still be edited later.

## Configure Phaseo with YAML

You can configure the same provider directly in `$DSH_HOME/settings.yaml`. Keep the API key out of this file; `apiKeyEnv` names the credential that Harness should resolve.

```yaml theme={null}
llm-pi-ai:
  providers:
    phaseo:
      displayName: Phaseo
      apiKeyEnv: PHASEO_API_KEY
      api: openai-completions
      baseURL: https://api.phaseo.app/v1
      models:
        - id: YOUR_PHASEO_MODEL_ID
```

Provide `PHASEO_API_KEY` in the environment that launches Harness, or store the same credential through the Models page. Replace `YOUR_PHASEO_MODEL_ID` with the exact ID returned by Phaseo model discovery. For coding-agent workflows, start with `anthropic/claude-sonnet-4.6`.

> [!NOTE]
>
> A `models` list in `settings.yaml` is a saved catalog, not a live query. Update it when you want to expose more Phaseo models in Harness.

## Verify the connection

Before testing Harness, confirm the credential and model discovery route independently:

```bash theme={null}
curl https://api.phaseo.app/v1/models \
  -H "Authorization: Bearer $PHASEO_API_KEY"
```

Then select a Phaseo model in a new Harness session and send:

```text theme={null}
Reply with exactly: Phaseo is connected.
```

A successful response verifies the complete path from Harness through Phaseo to the selected model provider.

## Troubleshooting

* **Fetching models returns `401`** - Check that the Phaseo API key is current and that the base URL includes `/v1`.
* **The model is missing from the picker** - Fetch the catalog again or add its exact Phaseo model ID under `models` in `$DSH_HOME/settings.yaml`.
* **Harness reports `MISSING_CREDENTIAL`** - Store the key in the Models page or make `PHASEO_API_KEY` available to the Harness process.
* **A request uses the wrong endpoint** - Select `OpenAI Completions` / `openai-completions`. This Harness integration uses Phaseo's `/v1/chat/completions` compatibility route.
* **A model rejects function tools with reasoning enabled** - Choose a model that supports tools on Chat Completions. Models that require the Responses API for reasoning with tools are not compatible with this Harness provider protocol.
* **An existing session keeps its old model** - Start a new session. Harness records the selected provider and model in sessions that have already sent a request.

## Related guides

* [Quickstart](https://phaseo.app/docs/v1/quickstart.md)
* [Build a Node REST smoke app](https://phaseo.app/docs/v1/cookbook/build-a-node-rest-smoke-app.md)
* [Routing and fallbacks](https://phaseo.app/docs/v1/guides/routing-and-fallbacks.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.