DSH Hub

GodD6366/dsh-sub2api

dsh-sub2api

UIWeb UI0 GitHub stars· updated 2026-08-15

Connect your sub2api gateway to DeepSeek Harness: OpenAI-compatible multi-provider routes (OpenAI / Claude / Grok / Gemini) behind one base URL, with per-key model discovery, usage lookup, and a settings page.

Install

npx @deepseek-ai/dsh plugin --profile web add @godd6366/dsh-sub2api

Restart `dsh web` after install. Bundle APIs can change during the developer preview.

README badge

dsh-sub2api DSH Hub badge
[![DSH Hub](https://dshhub.dev/badge/dsh-sub2api.svg)](https://dshhub.dev/plugins/dsh-sub2api)

Paste this into your README. The star count updates with every catalog sync.

From the README

Excerpt from GodD6366/dsh-sub2api, cleaned of badges and images.

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 / Gemini) and the models that key can serve. The four provider routes (sub2api-openai, sub2api-claude, sub2api-grok, sub2api-gemini) 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, Grok, and Gemini models side by side, and the harness routes each request to the key whose group owns the requested model.

Features

  • One base URL, four provider routes: sub2api-openai, sub2api-claude, sub2api-grok, sub2api-gemini — each configured with its own key, registered as a live LLM provider the moment the key is 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}/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" column 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), with editable levels and an explicit opt-out.
  • Usage lookup: "view usage" calls GET {baseURL}/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.
  • Global vision / image tools: analyze_image and generate_image stay available even when the current chat model cannot see or create images. They call a dedicated vision or image model configured on the settings page, and return a description or a workspace file path rather than injecting image blocks into a text-only session.
  • Auto Vision wrapper: image capability for text-only models. Every registered text-only provider route gets a same-name twin (<route>-vision, shown as "… + 自动识图") — our own sub2api-* routes and external providers (official deepseek-official, llm-pi-ai, routes added by other plugins). Twin models carry a -vision id/name suffix (e.g. deepseek-v4-flash-vision) so the picker shows at a glance which models accept images; the suffix is stripped again when the call is delegated back to the base route. The twin's catalog declares inputModalities: ['text', 'image'] so the harness attachment admission passes, and the twin's stream rewrites image blocks into vision-model transcriptions (via the configured tools.analyze model, cached per atta

Related plugins