DSH CCSwitch Importer
Import CCSwitch Codex provider configurations into DeepSeek Harness and manage per-model reasoning depth on the same Settings -> Models page.
Features
- Read-only scanning of
~/.cc-switch/cc-switch.dbfor custom Codex providers; official and default profiles are skipped. - Imports endpoints, protocol, model IDs, and API keys into DSH’s
llm-pi-aisettings. - Reads API keys only in the Host process and stores them through DSH credentials as an
apiKeyEnvreference; scan and import responses are redacted. - Prefills reasoning from the top-level Codex TOML field
model_reasoning_effortwhile keeping all values editable in DSH. - Maps
noneto disabled reasoning; known models use a conservative catalog; unknown models receive only the imported level; invalid values disable reasoning with a warning. - Re-imports preserve existing reasoning levels, route defaults, headers, capacity fields, and models that are absent from CCSwitch.
- Keeps the native Models page, CCSwitch import controls, and reasoning editor in one Models page.
- The CCSwitch import section, reasoning panel, and each model card can be collapsed; collapse preferences persist in the current browser.
CCSwitch is a read-only import source. After import, DSH settings and the credentials service are authoritative; the plugin never writes back to the CCSwitch database.
Installation
Install from GitHub:
dsh plugin --profile desktop add github:wtiaw/dsh-ccswitch-importerInstall from a local checkout:
dsh plugin --profile desktop add ./dsh-ccswitch-importerAfter installing or updating, reload DSH Web and open Settings -> Models.
Usage
1. Open CCSwitch Import on the Models page and click Scan. 2. Select the providers to import and click Import selected. 3. Review the import results and provider model list. 4. Confirm the prefilled reasoning levels in the reasoning section; edit wire values for a gateway when needed, then save. 5. Use the arrows in section headers or model cards to collapse and expand content; the preference is remembered automatically. 6. Use the saved reasoning levels from the composer model picker.
If a settings revision conflict occurs, the import stops and restores the credential written by that attempt; an existing credential is restored to its prior value.
Reasoning Catalog
The conservative defaults include:
- GPT-5.6 family:
off: none,low,medium,high,xhigh, andmax. - OpenAI o-series (
o1,o3,o4-miniand variants):off: null,low,medium, andhigh.
The catalog is only a default. Saved DSH fields remain user-controlled.
DSH Community Market Catalog
This plugin ships a standard catalog source for DSH Community Market as described in the catalog adapter guide (path A: standard source). The repo includes:
scripts/build-catalog.mjs— generates thecatalog-sourcemanifest and the/v1/pluginspage frompackage.jsonmetadata;scripts/deploy-catalog.sh— one-command Cloudflare Pages deployment (with JSON Content-Type rewrite rules);test/catalog.test.mjs— validates the output against the official schemas and asserts metadata consistency;- [docs/catalog.md](./docs/catalog.md) — deployment options, Content-Type requirements, and source registration.
The repository is also tagged with the GitHub topic dsh-plugin, so it is automatically indexed by the dshfind catalog source.
Build and deploy:
DSH_CATALOG_ORIGIN=https://catalog.example.com npm run build:catalogSecurity and Limitations
- Host routes accept only loopback, same-origin requests; API keys never enter the browser, logs, summaries, or error text.
- Reading requires Node.js 22.19 or newer for the read-only SQLite API.
- The plugin handles custom CCSwitch Codex providers and the fields currently present in the database; it does not probe third-party API capabilities.
- Unknown models and invalid levels default to disabled reasoning to avoid sending unconfirmed parameters to a gateway.
Development and Verification
Requirements: Node.js 22.19 or newer.
npm install
npm test
npm run pack:checknpm run build creates the DSH Host bundle and the Client bundle with the required window.__ModuleLoader__.load registration. The release package contains only dist, the patch, READMEs, and the license; source and tests are excluded.