Introduction

The DSH agent loop typically revolves around its model provider system. If your backend models come from Devin, for example glm-5.2 or swe-1.7, and DSH internally needs to route requests using a provider mechanism, you need an adapter to map Devin’s Connect RPC API to DSH’s LLM interface.

dsh-plugin-devin-bridge performs a specific task: it registers the devin provider, allowing DSH to invoke Devin-hosted models as backends and decode Devin’s streaming responses into DSH’s StreamChunk.

What is this

dsh-plugin-devin-bridge is a DSH LLM adapter plugin maintained by Arborsm under the MIT license.

The core problem it solves is: Devin’s model API is in the form of Connect RPC, while DSH’s model provider system requires local protocols like GenerateOptions and StreamChunk. This plugin performs protocol translation in the middle, allowing provider: devin to be used by the model selector and programmatic routing just like other DSH providers.

How it works

The plugin registers the devin provider route on DSH’s LLM seam (LlmAdapter). When the DSH agent loop routes a request to provider: devin, the adapter executes the following process:

  1. Translate DSH’s GenerateOptions (messages, tools, system prompt, images) into Devin’s GetChatMessageRequest protobuf.
  2. Stream read the response from the Devin Connect RPC endpoint.
  3. Decode each GetChatMessageResponse frame into DSH’s StreamChunk protocol, including text deltas, reasoning deltas, tool-call deltas, usage, and finish.

There are two points worth noting:

  • Dynamic Model Directory: Retrieves the real-time list of Devin models via the GetCascadeModelConfigs RPC with a 5-minute TTL cache and merges user-configured models as a fallback.
  • Network Failure Handling: When the dynamic directory request fails, it gracefully falls back to static configuration.

Installation and Usage

First, confirm that the runtime environment meets the package declarations:

node ^22.19 || >=24
dsh >=0.1.0-rc.6

Then, use the installation command:

pnpm add https://github.com/Arborsm/dsh-plugin-devin-bridge.git

After installation, the plugin requires valid credentials. If credentials are missing, it will throw an error at startup rather than failing silently.

Credentials and Token

This plugin uses Devin session token authentication. The token format is:

devin-session-token$<...>

The priority for token resolution is:

  1. The token in the DSH settings panel.
  2. The config.token in the plugin composition’s entry config.
  3. The credentials.toml generated by devin auth login.

The default path for automatically reading credentials.toml is:

Windows:
%APPDATA%\devin\credentials.toml

macOS/Linux:
~/.local/share/devin/credentials.toml
$XDG_DATA_HOME/devin/credentials.toml

You can also override the path using environment variables:

DEVIN_CREDENTIALS_PATH=/path/to/credentials.toml

The token field is marked as secret. In the settings descriptor returned to the wire surface, it is automatically redacted.

Optional Configuration

Optional configuration items include:

token
baseUrl
proxy
forceHttp1
defaultContextWindow
defaultMaxTokens
models
retryPolicy

Below is an example configuration. All fields are optional; values like baseUrl, proxy, and forceHttp1 in the example are retained from the README example.

config:
  token: ""
  baseUrl: "https://server.codeium.com"
  proxy: ""
  forceHttp1: true
  defaultContextWindow: 128000
  defaultMaxTokens: 16384
  models:
    - 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

Here, models is the example model directory. supportsImages indicates whether the corresponding model accepts image input via the DSH attachment system. proxy supports outbound proxy URLs in http/https/socks5 formats. The forceHttp1 example value is true.

When the DSH settings service is available, the above configuration can be adjusted via the settings panel at runtime, and changes take effect immediately (live applies).

Typical Usage

After configuration, the DSH model selector will display Devin as the provider, and available models will be visible. You can select a model directly in the UI or route to it programmatically:

provider: devin

Looking at the capability mapping, the plugin converts Devin’s responses into chunks that DSH can consume:

  • Text streaming: Complete text deltas and chunk assembly.
  • Reasoning/Thinking content: Mapped to DSH reasoning chunks.
  • Tool calls: Convert Devin tool-call deltas into DSH tool-call chunks.
  • Image input: Models with visual capabilities accept image input via the DSH attachment system.
  • Token usage: Report input/output token usage to DSH.
  • System prompt: Perform identity-agnostic system prompt rewriting for cross-model compatibility.

Applicable Scenarios and Notes

Suitable for the following scenarios:

  • You already have a Devin session token and want to use Devin-hosted models like glm-5.2 or swe-1.7 as backends in DSH.
  • You want DSH’s model selector, runtime settings panel, and programmatic provider routing to work directly.
  • You use the DSH internal agent loop and need mappings for text, reasoning, tool calls, image attachments, and token usage.

Suggestions before use:

  • The plugin reads and passes the Devin session token; check the source code, dependencies, and license before installing.
  • The plugin runs with the permissions of the current DSH process; credential files, network proxies, and outbound requests are all controlled by your environment.
  • The dynamic model directory relies on network requests; it falls back to static configuration on failure, but this does not guarantee the Devin service is available.
  • Configuration such as token, baseUrl, and proxy affects actual authentication and outbound behavior; explicit configuration and review are recommended in production environments.

Links

Source code repository:

https://github.com/Arborsm/dsh-plugin-devin-bridge

Directory page:

https://www.skillhub.cn/plugins/Arborsm/dsh-plugin-devin-bridge