Перейти к основному содержимому
G

apipod-dsh-plugin

geniuspath/apipod-dsh-plugin

Seven APIPod tools for the agent: list image, video and speech models, read one model request schema, quote a generation price, read the account balance, and start image or video jobs that are polled to completion; calls that spend balance ask for approval first.

Установка

dsh plugin --profile web add github:geniuspath/apipod-dsh-plugin

README

APIPod for DeepSeek Harness

English | 简体中文

Image and video generation tools for DeepSeek Harness (dsh), backed by APIPod. One plugin gives a dsh agent the APIPod model catalog, price quotes, and asynchronous image and video jobs.

It is a native dsh plugin: it runs inside dsh and calls the APIPod HTTP API directly. It does not need the APIPod MCP server.

Install

Requires dsh >=0.2.2-rc.5 <0.3.0.

dsh plugin --profile <profile> add @apipod/dsh-plugin

Then give dsh your API key (create one in the APIPod console). The plugin reads the credential reference APIPOD_API_KEY, which dsh resolves from its credential settings or from the environment:

export APIPOD_API_KEY=...

Start dsh with that profile. To confirm the layer is applied:

dsh --profile <profile> --dump-config

During install pnpm may report missing @deepseek-ai/* peer dependencies. The dsh installation provides those packages; the warning can be ignored.

Tools

ToolWhat it doesSpends balance
apipod_list_modelsLists image, video and speech modelsno
apipod_get_model_paramsReturns one model's request schemano
apipod_estimate_costQuotes a generation and compares it with the balanceno
apipod_get_balanceReads the account balance in USDno
apipod_generate_imageStarts an image job, returns job_idyes
apipod_generate_videoStarts a video job, returns job_idyes
apipod_check_jobReads a job's status, result URLs and final costno

Generation is asynchronous: a generate call returns a job_id and kind at once, and the agent polls apipod_check_job until the status is completed, failed or cancelled. A failed job is refunded by APIPod.

Model-specific parameters go in extras; apipod_get_model_params lists them.

Configuration

Set these under the plugin's row in a cordis.patch.yml. A patch replaces a row's whole config, so restate every key you want to keep.

- id: apipod
  name: '@apipod/dsh-plugin'
  config:
    apiKeyRef: APIPOD_API_KEY
    approvalMode: generation
KeyDefaultMeaning
apiKeyRefAPIPOD_API_KEYName of the credential reference holding the key. Never the key itself
approvalModegenerationgeneration: spending tools ask first. always: every tool asks. never: no prompt from this plugin
baseUrlhttps://api.apipod.aiAPI origin. Must be https
allowInsecureBaseUrlfalseAllow an http:// baseUrl for a loopback host only
requestTimeoutMs30000Deadline for one HTTP request
maxExtrasKeys32Most keys accepted in extras
topupUrlAPIPod billing pageReturned with the balance. Empty string omits it

An invalid value stops the plugin from loading, with the reason.

approvalMode only adds a prompt. It never overrides a denial from dsh's own permission policy, and never leaves that policy fully in charge.

Safety

  • The API key is never stored in configuration, logged, or returned to the model.
  • Spending calls ask the user first by default.
  • A repeated submission of the same call reuses one Idempotency-Key, so it returns the first job instead of charging twice.
  • The model cannot set callback_url or user, and reference media must be an https URL or an inline data: payload. The plugin reads no local files.
  • Installing the package runs none of its code (no install scripts), and releases carry npm provenance.

Details and how to report a vulnerability: SECURITY.md.

Limits

  • No upload of local files; pass a public https URL or a data: payload.
  • No speech generation tool yet. Speech models appear in the catalog only.
  • The plugin does not register APIPod as a chat model provider for dsh.

Plugin index

To list the plugin in dsh's Discover tab, enable Custom plugin indexes and add this index source:

https://geniuspath.github.io/apipod-dsh-plugin/index.json

The index is generated from npm on each release by scripts/build-index.mjs.

Development

pnpm install
pnpm typecheck
pnpm test
pnpm build
pnpm check:pack

Tests run the plugin on a real dsh tool pipeline with a stubbed fetch; they make no network calls and need no API key.

To try a local checkout in dsh, build it first, then link it:

dsh plugin --profile dev add /absolute/path/to/apipod-dsh-plugin

License

Apache-2.0

Похожие плагины