backrooms-yrc/dsh-openai-gateway ↗★ 1
dsh-openai-gateway
Expose DeepSeek Harness as an OpenAI-compatible API server: /v1/chat/completions (stream + non-stream) and /v1/models, each API call backed by a real agent session with tools and a workspace.
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:backrooms-yrc/dsh-openai-gateway说明文档
阅读完整 README ↗配置参考
patch 层条目(- id: openai-gateway + config:),未写的键用默认值:
| 键 | 默认 | 说明 |
|---|---|---|
enabled | true | 总开关 |
host | 127.0.0.1 | 只绑回环最安全,对外走反代 |
port | 41540 | 端口;0 = 随机(实际值写入 state.json) |
apiKeys | [] | 留空自动生成并落盘(0600);填数组则只用你给的 |
sessionMode | both | both / stateless(后者拒绝粘性会话请求) |
maxSessions | 16 | 粘性会话簿记上限(LRU) |
timeoutSeconds | 300 | 单轮超时:取消 Agent 并返回 504 |
defaultModel | '' | 请求未指定 model 时的兜底;空 = dsh 默认 |
workspace.cwd | '' | Agent 工作目录;空 = $DSH_HOME/openai-gateway/workspace |