GodD6366/dsh-sub2api

将你的sub2api网关连接到DeepSeek Harness:通过一个基础URL实现OpenAI兼容的多提供商路由(OpenAI / Claude / Grok / Gemini),支持按密钥的模型发现、用量查询和设置页面。

Project Overview项目介绍

dsh-sub2api is a DSH plugin that connects a sub2api gateway as OpenAI, Claude, Grok, and Gemini model providers. It supports streaming, tool calls, model discovery, usage lookup, reasoning effort, global image tools, and Auto Vision wrappers. Use it when subscription quota should be exposed through Harness as OpenAI-compatible routes. Keys are group-specific, and it relies on the pi-ai adapter; read-only installs require running the patch script manually.

dsh-sub2api 是 DSH 插件,把 sub2api 网关接入为 OpenAI、Claude、Grok、Gemini 四条模型路由,支持流式、工具调用、模型拉取、用量查询、推理强度与自动识图。需要把订阅额度网关统一接入 Harness 时使用;注意密钥按平台分组配置,且依赖 pi-ai 适配器,只读安装需手动运行补丁脚本。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add @godd6366/dsh-sub2api

把 GodD6366/dsh-sub2api 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-sub2api

中文文档

Connect your sub2api gateway to DeepSeek Harness as model providers.

Sub2API is an AI API gateway that turns subscription quota into OpenAI-compatible endpoints. In its model, each API key is bound to a group, and the group decides the platform (OpenAI / Claude / Grok) and the models that key can serve. The three provider routes (sub2api-openai, sub2api-claude, sub2api-grok) are served by the harness's own pi-ai adapter (dsh-llm-pi-ai): this plugin translates its llm-sub2api: settings into llm-pi-ai: provider profiles (all sharing one bare-host base URL, no /v1), and protocol serialization, streaming, and usage accounting all live in pi-ai. The same gateway serves OpenAI, Claude, and Grok models side by side, and the harness routes each request to the key whose group owns the requested model.

Features

  • Image generation: select a generation model in settings. generate_image saves images to the workspace and returns an inline attachment. The separate image-analysis tool and its model selector have been removed.

  • One base URL, three provider routes: sub2api-openai, sub2api-claude, sub2api-grok — each configured with its own key and at least one model, registered as a live LLM provider as soon as both are set.

  • Streaming chat (backed by pi-ai): SSE streaming, tool calls, reasoning deltas, and token usage are mapped to the harness protocol by dsh-llm-pi-ai, which natively handles wire-format details like top-level function_call items in the Responses API.

  • Model discovery: one-click "fetch models" calls GET {baseURL}/v1/models with the key, so each route's catalog matches exactly what the sub2api group serves.

  • Reasoning effort (thinking mode): reasoning_effort is passed straight through to the gateway and adjustable right in the chat model selector; the settings page's per-model "reasoning strength" field fills each model's real levels from models.dev reasoning_options (e.g. gpt-5.6-sol → none/low/medium/high/xhigh/max, deepseek-v4-flash → low/high/max), editable in the settings page; reasoningEfforts: [] opts a model out.

  • Usage lookup: "view usage" calls GET {baseURL}/v1/usage and summarizes quota, balance, rate limits, and subscription windows.

  • Standards-based config: base URL and model catalogs live in the llm-sub2api: settings section ($DSH_HOME/settings.yaml, written by the web Models page); keys go through the harness credential store.

  • Provider icons from lobehub/lobe-icons, embedded as SVG in the settings page.

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-skillflux 下一个 Next fatfish-pet-smart-companion →