sfyyy/dsh-generation-image1

@dsh-extension/dsh-generation-image

On-demand image generation for DeepSeek Harness (DSH): a generate_image tool that calls your own OpenAI-compatible image URL + API key and delivers the image into the session

包名
@dsh-extension/dsh-generation-image
版本
1.0.0
许可证
MIT
最近更新
2026年8月22日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:sfyyy/dsh-generation-image

Configuration

Configure it in Settings → Generation Image (DSH Web), or edit ~/.dsh/generation-image.json. The plugin ships with empty credentials by default — you supply your own endpoint URL + API key (via the Settings page, env vars, or the config file):

{
  "enabled": true,
  "baseUrl": "https://your-image-endpoint.example/v1",
  "apiKey": "sk-xxxx",
  "model": "gpt-image-2",
  "size": "",
  "quality": "auto"
}
  • baseUrl — OpenAI-compatible image API root (.../v1); empty by default, the plugin normalizes it and calls ${baseUrl}/images/generations or ${baseUrl}/images/edits according to the tool arguments.
  • apiKey / apiKeyEnvempty by default, mutually exclusive. A directly entered key is synced to the DSH credential store and referenced as DSH_GENERATION_IMAGE_API_KEY.
  • model — the image model id (default gpt-image-2).
  • size — default size hint, empty by default = unrestricted: the model passes any size per call, or "auto" to let the API decide. No value is hardcoded or restricted.
  • quality — default quality hint: auto (default; omitted from the request, the API decides) or any value the model/endpoint accepts.
  • enabled: false disables the whole chain: no tool registration, no image rewriting, no admission bypass (native behavior restored).

Precedence (highest wins): Settings page (with schema defaults) → environment variables → config file.

Environment overrides: DSH_GENERATION_IMAGE_BASE_URL, DSH_GENERATION_IMAGE_API_KEY, DSH_GENERATION_IMAGE_API_KEY_ENV, DSH_GENERATION_IMAGE_MODEL, DSH_GENERATION_IMAGE_SIZE, DSH_GENERATION_IMAGE_QUALITY, DSH_GENERATION_IMAGE_ENABLED.