DeepSeek Harness plugin
The Liquid Inference plugin for DeepSeek Harness (dsh) adds the exchange to the harness. It adds a liquid model route and four read-only market tools. The source is architect-xyz/liquid-dsh-plugin.
To use the exchange without the plugin, see DeepSeek Harness. That guide writes a patch file by hand. The Liquid CLI can also start dsh for you.
Before you start
- A workspace with a balance and a
spendkey. See API keys. - DeepSeek Harness with a profile, for example
web.
The package is not on npm yet. Install it from GitHub or from a packed tarball.
1. Export the buyer key
export LIQUID_API_KEY=sk-liquid-...
The plugin reads the key for each request. It reads the credential store of the profile first, and then LIQUID_API_KEY. It never writes the key to a config file. A headless profile has no credential store, so it needs the variable.
2. Install the plugin
Install from GitHub. The package builds itself when you install it:
dsh plugin --profile web add github:architect-xyz/liquid-dsh-plugin
The first run fails with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED, because pnpm blocks the build script. To fix it, add the package to allowBuilds in $DSH_HOME/profiles/web/pnpm-workspace.yaml, then run the command again:
allowBuilds:
dsh-liquid-inference: true
This setting lets the package run its build script on your computer, outside a sandbox. Pin a commit, for example github:architect-xyz/liquid-dsh-plugin#<sha>, so a later push cannot change what runs.
Install without a build permission
Pack the plugin and install the tarball:
git clone https://github.com/architect-xyz/liquid-dsh-plugin.git
cd liquid-dsh-plugin && pnpm install && pnpm pack
dsh plugin --profile web add ./dsh-liquid-inference-0.1.0.tgz
Restart the profile. Choose Liquid Auto (liquid.auto) in the model picker.
What the plugin adds
The liquid model route
The plugin needs no adapter code. It patches the stock llm-pi-ai adapter with api: openai-completions, the exchange base URL with /v1, and apiKeyEnv: LIQUID_API_KEY. The patch sets these values:
| Setting | Value |
|---|---|
| Cap | Each request sends x-liquid-cap-usd. The default is 1 USD. Set LIQUID_CAP_USD before you start to change it. |
| Models | liquid.auto, the ranking variants :cheapest, :economy, :balanced and :premium, and deepseek-v4-flash. |
| Reasoning | The levels low, medium and high go to the exchange as reasoning_effort. |
To add a model, add an entry under models in the cordis.patch.yml of your profile. Use a name from the Market page. See Market data.
The exchange does not check the reasoning level. If the winning provider refuses the level, that request fails.
Market tools
| Tool | Endpoint | Key |
|---|---|---|
liquid_get_book |
GET /v1/exchange/offers |
Not used |
liquid_get_markets |
GET /v1/exchange/markets |
Not used |
liquid_get_routers |
GET /v1/exchange/routers |
Not used |
liquid_get_job |
GET /v1/jobs/{id} |
Used |
Chat, image, speech and video purchases are not tools. The model route is the only place where the harness spends money.
Data handling
The harness sends full prompts and tool results to the exchange. The exchange sends them to the provider that wins the auction. See Data handling.
Notes
- The patch replaces the whole
configof thellm-pi-airow. If another bundle also configures pi-ai providers, write their settings again in yourcordis.patch.yml. - The cap limits each request. To limit the total spend, set a spending limit on the key. See API keys.
Next steps
- DeepSeek Harness: set up the harness by hand, with no plugin.
- Apps: the other plugins and tools.
- Skills: teach a coding agent to use the exchange.