dsh-imagegen
Image generation plugin for dsh: a single imagegen tool (generate/providers/models/status verbs) over OpenAI-compatible image backends, configured via IMAGEGEN_* env or the dsh-imagegen: settings section 适合需要在DSH会话中直接调用外部API进行画图的用户。
같은 패키지 이름의 다른 저장소
설치
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:xuan25/dsh-imagegenConfiguration
Providers are configured in any of four layers, lowest to highest priority;
the providers verb reports the originating layer of every field, so a
shadowed value is never silent:
- the built-in default (
api: openai-compatible), - the
IMAGEGEN_*env contract (static per process boot), - the cordis config layer (a patch entry with id
dsh-imagegenand aconfigobject, or profile-level patches), - the
dsh-imagegen:section in the user settings document ($DSH_HOME/settings.yaml), which the plugin re-reads on every call, so settings edits apply without a restart.
dsh-imagegen:
defaultProvider: local
providers:
local:
baseURL: http://:
/v1
hosted:
baseURL: https://api.example.com/v1
apiKeyEnv: IMAGEGEN_HOSTED_KEY
models: [flux-1]
displayName: Hosted Images
The env contract mirrors the config fields 1:1: IMAGEGEN_DEFAULT_PROVIDER,
and per route the variables `IMAGEGEN_PROVIDER__BASEURL`, `IMAGEGEN_PROVIDER__API`, `IMAGEGEN_PROVIDER__APIKEYENV`, `IMAGEGEN_PROVIDER__HEADERS`, `IMAGEGEN_PROVIDER__MODELS`, `IMAGEGEN_PROVIDER__DISPLAYNAME`. The segment is the route name
uppercased with - written as _. The headers value is a JSON object
string, and the models value is a comma-separated list of model ids. The
baseURL value is the OpenAI-compatible base URL including the /v1 prefix
(the same shape as an LLM provider base URL); the plugin appends
/images/generations and /models to it verbatim, and the image contract has
no server-root endpoints. The apiKeyEnv value is a reference to an
environment variable name, never a secret in config; per request the value
resolves from the process environment, then from
$DSH_HOME/.credentials.yaml.