RailgunHamster/dsh-grok-adaptation0

dsh-grok-adaptation

Normalize undersized Grok Responses images with Sharp while leaving supported large images unchanged.

包名
dsh-grok-adaptation
版本
0.3.1
最近更新
2026年9月3日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:RailgunHamster/dsh-grok-adaptation

Route configuration

Add the marker only to the Grok route:

llm-pi-ai:
  providers:
    grok:
      api: openai-responses
      baseURL: https://api.example.com/v1
      apiKeyEnv: GROK_API_KEY
      headers:
        x-dsh-grok-adaptation: v2

Do not add this marker to ordinary GPT or web-search provider routes.

To limit interception to one upstream host, set plugin config:

- id: grok-adaptation
  config:
    hostnames: ['api.example.com']
    autoModelPrefixes: ['grok-']

路由配置

只给 Grok 路由添加标记:

llm-pi-ai:
  providers:
    grok:
      api: openai-responses
      baseURL: https://api.example.com/v1
      apiKeyEnv: GROK_API_KEY
      headers:
        x-dsh-grok-adaptation: v2

不要给普通 GPT 或 web-search provider 路由添加这个标记。

如果只想拦截某一个上游主机,可以在插件配置里写:

- id: grok-adaptation
  config:
    hostnames: ['api.example.com']
    autoModelPrefixes: ['grok-']