Arborsm/dsh-plugin-devin-bridge
A dsh LLM adapter plugin that bridges Devin's Connect RPC API into the dsh model provider system, enabling dsh's internal agent loop to use Devin-hosted models (glm-5.2, swe-1.7, and any other model Devin exposes) as backends.
catalog descriptioncatalog 简介 / catalog description:Devin Connect 反代为 OpenAI Chat Completions 兼容协议的 dsh 插件,服务 glm-5.2 / swe-1.7
Project Overview项目介绍
A dsh plugin that bridges Devin's Connect RPC API into the dsh model provider system, registering a devin route that translates GenerateOptions into Devin's protocol and decodes streaming responses into StreamChunk (text, reasoning, tool calls, usage). Use it when routing dsh's agent loop to Devin-hosted models like glm-5-2 or swe-1-7. A Devin session token is required, auto-detected from settings, entry config, or credentials.toml; otherwise startup fails.
dsh 插件,把 Devin Connect RPC 接口接入 dsh 模型提供方系统,注册 devin 路由,把 dsh 的 GenerateOptions 转为 Devin 协议并把流式响应解码为 StreamChunk。适用于希望借助 dsh 的代理循环使用 Devin 托管模型(如 glm-5-2、swe-1-7)的用户。需要 Devin 会话令牌,可从设置面板、入口配置或 credentials.toml 自动读取,缺失时启动会报错。
请帮我了解并安装插件:【dsh-plugin-devin-bridge】【https://github.com/Arborsm/dsh-plugin-devin-bridge】
Send this message to DSH in your current session. CLI install commands may not be accurate across systems — DSH will figure it out for you.把上面这条消息直接发给当前会话里的 DSH,让它帮你了解并安装。安装命令不一定准确,发给 DSH 更稳。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add github:Arborsm/dsh-plugin-devin-bridge
把 Arborsm/dsh-plugin-devin-bridge 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-plugin-devin-bridge
A dsh LLM adapter plugin that bridges Devin's Connect RPC API into the dsh model provider system, enabling dsh's internal agent loop to use Devin-hosted models (glm-5.2, swe-1.7, and any other model Devin exposes) as backends.
How it works
The plugin registers a devin provider route on ctx.llm via the dsh LLM seam (LlmAdapter). When dsh's agent loop routes a request to provider: devin, the adapter:
- Translates dsh's
GenerateOptions(messages, tools, system prompt, images) into Devin'sGetChatMessageRequestprotobuf - Streams the response from Devin's Connect RPC endpoint
- Decodes each
GetChatMessageResponseframe into dsh'sStreamChunkprotocol (text deltas, reasoning deltas, tool-call deltas, usage, finish)
Installation
pnpm add https://github.com/Arborsm/dsh-plugin-devin-bridge.git
Token resolution
The adapter needs a Devin session token (format: devin-session-token$<...>) to authenticate. It resolves the token in priority order:
- Settings panel — set
tokenin the dsh settings UI (marked as secret, auto-redacted in wire responses) - Entry config —
config.tokenin the plugin composition - Devin CLI credentials — automatically read from
credentials.tomlcreated bydevin auth login:- Windows:
%APPDATA%\devin\credentials.toml - macOS/Linux:
~/.local/share/devin/credentials.toml(or$XDG_DATA_HOME/devin/credentials.toml) - Override path with
DEVIN_CREDENTIALS_PATHenvironment variable
- Windows:
If no token is found, the plugin throws at startup with a actionable error message.
Configuration
All fields are optional — the plugin works out of the box once a token is available (via settings panel, entry config, or credentials.toml).
- id: devin-bridge
name: dsh-plugin-devin-bridge
config:
token: "" # optional: explicit token; empty = auto-detect from credentials.toml
baseUrl: "https://server.codeium.com" # optional: Devin Connect endpoint
proxy: "" # optional: outbound proxy URL (http/https/socks5)
forceHttp1: true # optional: force HTTP/1.1 (default true)
defaultContextWindow: 128000 # optional: fallback context window
defaultMaxTokens: 16384 # optional: fallback max output tokens
models: # optional; defaults to glm-5-2 and swe-1-7
- id: "glm-5-2"
name: "GLM-5.2"
contextWindow: 128000
maxTokens: 16384
supportsImages: false
- id: "swe-1-7"
name: "SWE-1.7"
contextWindow: 128000
maxTokens: 16384
supportsImages: true
retryPolicy: # optional
mode: normal
maxRetries: 3
backoff:
initialDelayMs: 500
maxDelayMs: 10000
jitterRatio: 0.1
When the dsh settings service is available, all of the above can be adjusted at runtime through the settings panel — changes take effect immediately (live applies). The token field is marked role('secret') so it is automatically redacted in settings descriptors returned to wire surfaces.
Usage
Once configured, dsh's model selector will show Devin as a provider with available models. Select any model in the dsh UI or route to it programmatically with provider: devin.
Features
- Dynamic model catalog: Fetches the live model list from Devin via
GetCascadeModelConfigsRPC (5-minute TTL cache), merging user-configured models as fallback. Network failures gracefully fall back to the static config. - Text streaming: Full text delta streaming with block assembly
- Reasoning/thinking: Reasoning content mapped to dsh's
reasoningblock type - Tool calls: Devin tool-call deltas translated to dsh's
tool-callblocks - Image support: Vision-capable models accept image inputs via dsh's attachment system
- Token usage: Input/output token accounting reported to dsh
- System prompt sanitization: Identity-agnostic system prompt rewriting for cross-model compatibility
- Proxy support: Optional outbound HTTP/HTTPS/SOCKS5 proxy
- Settings panel integration: Runtime-adjustable configuration via dsh settings service
- Credential auto-detection: Reads
devin auth logincredentials when no explicit token is configured
Architecture
src/
├── index.ts # Cordis plugin entry: Config schema, settings panel, ctx.llm registration
├── adapter/
│ ├── devin.ts # DevinAdapter: GenerateOptions → Devin RPC → StreamChunk
│ ├── decoder.ts # GetChatMessageResponse → StreamChunk translation
│ ├── transport.ts # Connect transport with auth + proxy injection
│ └── credentials.ts # Devin CLI credentials.toml auto-detection
└── proto/
├── devin.proto # Trimmed protobuf definitions
└── gen/ # @bufbuild/protobuf generated code
License
MIT
weijiafu14/pi2dsh
Totoro-qaq/dsh-plugin-bridge
YTyangtao666/dsh-skills-bridge
Hilbert-beinghappy/seektty
Renzic-Stone/DSH-EasyRewrite
xiajiajun516/dsh-config-manager
baihejiangnan/deepseek-harness-desktop