RailgunHamster/dsh-grok-adaptation ↗★ 0
dsh-grok-adaptation
Normalize undersized Grok Responses images with Sharp while leaving supported large images unchanged.
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:RailgunHamster/dsh-grok-adaptation说明文档
阅读完整 README ↗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-']