DSH’s ecosystem philosophy is “everything is a plugin.” When using the llm-pi-ai adapter, its models list directly replaces the route catalog, and that catalog does not self-refresh. This means that if you want to use OpenRouter’s free models, you usually need to maintain settings.yaml manually.

The dsh-openrouter-free plugin aims to fill this automation gap. It provides a free-model list through the GUI, supports one-click switching and automatic adaptation of the reasoning effort level, eliminating the hassle of manual configuration.

Core Features

Free Model List Panel
The GUI session view adds a “Free Models” tab. It lists all OpenRouter free models in real time (including name, ID, context window, and image/reasoning support). The plugin has a built-in 10-minute in-memory cache and supports manual forced refresh.

One-Click Switching
Clicking any row in the list causes the plugin to write that model ID to llm-pi-ai.providers.openrouter.models, while also using the native sessionController.selectModel() to update the current session’s model selection and synchronously update agent-default-model. This session-level + global dual-write mechanism ensures the switch takes effect immediately, without a restart.

Automatic Reasoning Level Prevalidation
When switching models, the plugin tries the supported levels from high to low (low/medium/high). If the model does not support reasoning, it automatically removes the reasoningEffort parameter to avoid request failures caused by parameter mismatch.

Credentials Panel
A built-in OpenRouter API key configuration entry. If a missing key is detected, it directly prompts you to provide one.

Install All into Selector
After running “Install All into Selector,” all free models are written to the route. Users can then switch via this plugin or directly use DSH’s built-in native model selector.

Safe Preservation of Manual Entries
When syncing or switching models, the plugin preserves all non-free manual entries (e.g., curated entries such as stealth/ox-alpha). The “Install All into Selector” operation also only refreshes free entries.

Installation

This plugin must be installed by manually copying the source code and registering the bundle.

# 复制源码到 profile 的 node_modules 目录
Copy-Item -Recurse -Force . "C:\Users\73618\.dsh\profiles\web\node_modules\dsh-openrouter-free"
// 编辑 profile 的 package.json,在 dsh.profile.bundles 中追加 "dsh-openrouter-free"
// 示例片段
"dsh.profile.bundles": [
  "dsh-openrouter-free"
]

After installation, restart DSH (host changes require a restart; client changes only require a hard refresh).

Typical Usage

The plugin provides an HTTP API endpoint POST /__orfree/api, supporting the following operations:

Method Parameters Description
free.list({refresh}) refresh (optional) Get the free list. Cache for 10 minutes; pass refresh: true for forced refresh.
current() None Get the current agent-default-model and the list of installed model IDs.
model.use({id}) id (required) Install a single free model and set it as the current conversation model.
sync.all() None Install all free models into the openrouter route.
free.remove({id}) id (required) Remove a free model (operation is rejected for the currently selected model).

Prerequisites and Notes

Prerequisites
Your local settings.yaml must already define the llm-pi-ai.providers.openrouter route (baseURL: https://openrouter.ai/api/v1). Also, the environment variable OPENROUTER_API_KEY must exist; even though fetching the list itself is a public API, using free models for chat still requires a key.

Notes
* The plugin runs under the permissions of the current DSH process; before installation, it is recommended to check the source code and license (MIT).
* Updates to settings.yaml take effect on the next request; no DSH restart is required.
* The DSH community catalog (such as SkillHub) has no official affiliation with DeepSeek / Huanfang; this plugin is a community-maintained project.