dsh-llm-grok
by clarkzhao
DeepSeek Harness 的 Grok 插件。
dsh plugin for grok
安装
dsh plugin --profile web add github:clarkzhao/dsh-llm-grokGitHub 源码安装:首次需按提示配置 allowBuilds 构建授权后重试
安装与环境配置指引、插件开发教程见 DSH 中文社区文档 ↗
安装即在你的机器上以你的权限运行第三方代码——它可读写文件、使用凭据、访问网络,DSH 的工具审批不会为插件代码加沙箱。「检测到 manifest」仅代表发现 dsh.bundle / dsh.plugin 清单,不构成兼容性或安全审查;安装前请审阅源码,不熟悉的插件先在不含密钥的环境试用。
README
DeepSeek Harness 插件:把 Grok 订阅额度 接成 DSH 的 LLM 提供方。
- GitHub:https://github.com/clarkzhao/dsh-llm-grok
- npm:
dsh-llm-grok - topic:
dsh-plugin
Grok 4.6 / 4.5 在本插件里是原生多模态:用户贴图和 tool-result 里的图会随同一次 /chat/completions 发给订阅端点。图不是先 OCR 成字再交给文本模型,也不会多出一个识图工具。
能力
| grok-4.6 | grok-4.5 | |
|---|---|---|
| 思考强度 | low / medium / high / xhigh | low / medium / high |
| 上下文 / 输出 | 500K / 128K | 同左 |
| 输入模态 | text + image | text + image |
- 默认
baseURL:https://cli-chat-proxy.grok.com/v1 - 走本机 HTTP 代理(默认 Clash
http://127.0.0.1:7890),不依赖 Python 旁路 - 会话日志只存附件引用(
sha256:)。像素只在发请求时从ctx.attachments读出,编成image_urldata URL - 缺附件服务、或图出现在 system / assistant 消息里:
UNSUPPORTED_CONTENT
安装
dsh plugin --profile web add dsh-llm-grok
# 未全局安装 dsh 时:
npx @deepseek-ai/dsh plugin --profile web add dsh-llm-grok
其他来源:github:clarkzhao/dsh-llm-grok,或在仓库目录执行 dsh plugin --profile web add .。把 web 换成你的 profile 名即可。
安装后 bundle 会写入 llm-grok 并注册 grok provider。若曾在 llm-pi-ai 里加过同名 grok,先删掉,避免路由冲突。
凭据
插件不读 ~/.grok/auth.json。它只解析 DSH 凭据 GROK_SESSION_TOKEN。
grok login(token 会落到~/.grok/auth.json,方便你复制)写入
~/.dsh/.credentials.yaml:GROK_SESSION_TOKEN: <token>或启动 DSH 前
export GROK_SESSION_TOKEN=...
未配置时请求会失败:dsh-llm-grok: missing credential GROK_SESSION_TOKEN。
发往订阅端点时使用:
Authorization: Bearer <token>
X-XAI-Token-Auth: xai-grok-cli
x-authenticateresponse: authenticate-response
x-grok-client-version: 1.0.4
x-grok-model-override: grok-4.6 | grok-4.5
后端据此按 订阅用户 计费,而不是普通 API Key。
配置
默认在插件的 cordis.patch.yml。可在 profile 或 home 层覆盖:
- id: llm-grok
name: dsh-llm-grok
config:
baseURL: https://cli-chat-proxy.grok.com/v1
apiKeyEnv: GROK_SESSION_TOKEN
proxy: http://127.0.0.1:7890
models:
- id: grok-4.6
name: Grok 4.6
contextWindow: 500000
maxTokens: 128000
reasoningEfforts:
low: low
medium: medium
high: high
xhigh: xhigh
- id: grok-4.5
name: Grok 4.5
contextWindow: 500000
maxTokens: 128000
reasoningEfforts:
low: low
medium: medium
high: high
开发
npm install
npm test
npm run build
dsh-llm-grok/
├── package.json
├── cordis.patch.yml
├── src/
│ ├── index.ts # 注册 grok provider,注入凭据与附件读取
│ ├── adapter.ts # LlmAdapter:chat-completions + 模态声明
│ ├── serialize.ts # DSH 消息 → 文本 / image_url / 工具
│ ├── translate.ts # SSE → DSH StreamChunk
│ └── types.ts
└── tests/
└── serialize.test.ts
限制
- 只走 chat-completions,不实现官方 CLI 默认的 Responses API
- 不做大图请求体驱逐(grok-build 约 50MB 那套策略尚未搬过来)
- Trajectory 不会出现单独的「识图」tool 行:图在 adapter 组请求时编进 user / tool 消息
原始 README: https://github.com/clarkzhao/dsh-llm-grok/blob/main/README.md ↗
同类插件
查看全部 →
agent-vision-toolkit
为纯文本模型"看图“设计更好的视觉工具箱和技能,支持多图理解,图片问答,前端UI还原、GUI 自动化等,并可选无缝接入多个主流agent,直接识别粘贴图片| A vision toolkit and skill designed for text-only llms — image Q&A, long-screenshot OCR, frontend UI restoration, and GUI automation, with optional seamless integration for Codex, Claude Code, Pi, Oh My Pi, and OpenCode

api-relay-audit
从 DeepSeek Harness 对 AI API 中转站和 LLM 代理运行本地安全审计,生成 Markdown 报告,覆盖提示词注入、模型替换信号、工具调用改写、错误泄漏、流完整性和按 profile 启用的 Web3 风险。

OpenStory
✨ OpenStory 现已支持 DeepSeek Harness 插件! 现在可以通过 dsh-openstory 将 OpenStory 多智能体推演接入 DeepSeek Harness,让 agent 直接启动模拟、查看角色、下达指令并逐回合推进故事。查看 DSH 插件配置与使用指南。

phi
pi的编码代理 ∞ 提供者、子代理、hashline编辑和权限门

anysearch-dsh
DeepSeek Harness(DSH)的 AnySearch 网络搜索提供方与高级搜索工具。

codex-switch
Codex Switch 是一个 macOS 工具,一键配置 Codex 的自定义 API,同时保留官方 OpenAI 登录。保存后 Codex 的模型选择器里只会出现你选的那个 provider 的模型。也支持 Claude Code 的官方 / 自定义 API 切换。Codex Switch is a lightweight helper for configuring multiple coding-agent API routes. For Codex, it keeps Official OpenAI and a custom API provider configured in parallel, registers the custom model in Codex's mod