DEEPSEEK HARNESS

Run DeepSeek Harness with one your-api API key

Connect Harness through a custom OpenAI-compatible provider and use DeepSeek V4 Flash Vision for image understanding, or Flash and Pro for text workflows. All three use the same endpoint for streaming, tools, multi-turn agent sessions, and native thinking controls.

Enable image inputs in OK DSH desktop

Download OK DSH and connect your OK-API key. Automatic setup declares text and image inputs for deepseek-v4-flash-vision-exp. Select that model in Harness before attaching a screenshot or image; Flash and Pro remain text-only.

Already connected? Finish active work, then re-enter your key in the OK DSH launcher and connect again to refresh model capabilities. This restarts the local Harness service; simply reopening the app reuses the previously saved model configuration.

01

Create a key

Create a user key in your-api. Do not enter a DeepSeek official key in Harness.

02

Add a custom provider

Use the permanent Provider ID ok-api and the OpenAI Completions protocol.

03

Select a model

Choose Flash Vision for images, or Flash/Pro for text workflows.

WEB UI

Configure the provider

Open Settings → Models → Add custom provider. The built-in DeepSeek card targets DeepSeek's official endpoint and is not the correct place for an your-api key.

Provider IDok-apiPermanent; saved sessions and credential references use it.
Display nameOK-API DeepSeekShown in the Harness model picker.
Base URLhttps://api.ok-api.net/v1Keep /v1; Harness appends /models and /chat/completions.
API protocolopenai-completionsHarness streams OpenAI-compatible Chat Completions.
API keyYour OK-API keyHarness stores it as a write-only local credential.
Modelsdeepseek-v4-flash-vision-exp, deepseek-v4-flash, deepseek-v4-proAdd at least one model before saving.

ADVANCED

Enable DeepSeek thinking levels

For direct settings.yaml configuration, declare the DeepSeek thinking dialect explicitly. Harness cannot infer it from the your-api gateway hostname.

llm-pi-ai:
  providers:
    ok-api:
      displayName: OK-API DeepSeek
      apiKeyEnv: OK_API_KEY
      api: openai-completions
      baseURL: https://api.ok-api.net/v1

      compat:
        thinkingFormat: deepseek
        supportsReasoningEffort: true

      defaultInput: [text]
      defaultContextWindow: 1048576
      defaultMaxTokens: 393216

      models:
        - id: deepseek-v4-flash-vision-exp
          name: DeepSeek V4 Flash Vision Exp
          input: [text, image]
          contextWindow: 1048576
          maxTokens: 393216

        - id: deepseek-v4-flash
          name: DeepSeek V4 Flash
          contextWindow: 1048576
          maxTokens: 393216
          reasoningEfforts:
            off:
            high: high
            max: max

        - id: deepseek-v4-pro
          name: DeepSeek V4 Pro
          contextWindow: 1048576
          maxTokens: 393216
          reasoningEfforts:
            off:
            high: high
            max: max

off: exposes an explicit Off choice. With the DeepSeek dialect, Harness sends thinking.type: disabled; High and Max are forwarded as DeepSeek reasoning effort levels.

VERIFY

Test authentication and model discovery

export OK_API_KEY="sk-your-ok-api-key"

curl https://api.ok-api.net/v1/models \
  -H "Authorization: Bearer $OK_API_KEY"

In Harness, use Fetch available models or reopen the model selector. A successful configuration shows all three models under OK-API DeepSeek. Provider changes apply to the next request without restarting Harness.

MISSING_CREDENTIAL

Save the key in Harness or make sure OK_API_KEY is available to the Harness process.

UNKNOWN_MODEL

Add the missing model to the custom provider and confirm it is enabled for your your-api key.

Model discovery returns 401

Replace the your-apikey. Never use an administrator's DeepSeek upstream key here.

Thinking controls are missing

Use the YAML configuration and include both reasoningEfforts and compat.thinkingFormat: deepseek.

An image is refused before sending

Add input: [text, image] only to thedeepseek-v4-flash-vision-exp model entry, then start a new Harness session.

Ready to run an agent?

Create a scoped key, configure the provider, and start with DeepSeek V4 Flash.

Create API key