Connects locally signed-in Trae CN models to DSH, supports DSH-executed tool calls, account switching, and Work/general credit visibility.
Install
# from npm (prebuilt)
dsh plugin --profile web add dsh-connect-trae
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:dingminhua/dsh-connect-trae
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
Account names, balances and timestamps in this document and its screenshots are demo data (
demo-*); no real account information is shown.
A DeepSeek Harness (DSH) bundle plugin that connects locally signed-in Trae models (CN, enterprise, and international installs) to the DSH model picker. Trae generates structured tool calls while DSH executes its own local tools, with a usage overview (Work/general credits on CN, tenant allowance on enterprise, subscription status on international), daily check-in claiming, and a model-management panel. The CN, enterprise, and international sides are three parallel providers (trae / trae-enterprise / trae-global) that can be used at the same time; the settings page (Settings → Trae, its own page in the settings nav) separates them with tabs for convenient management.
Runs on macOS, Windows, and Linux: CI runs the full typecheck / test / build matrix on ubuntu-latest and windows-latest, and Windows gets purpose-built handling for directory probing, app version headers, and lock behavior — see Windows notes.
Apart from the daily check-in claim, every query this plugin makes is read-only and consumes nothing; the claim only happens when you click the button.
Boundary: this plugin does not interoperate with any other plugin. Accounts, credentials, the model directory, the account pool and the settings namespace belong to this plugin alone; a
traefailure never borrows another plugin's account or credit, and vice versa. Why, and what that rules out, is in Relationship to other plugins.
Icon style
In the account pool, open More settings and choose Claude style or Default icon. The sidebar and page icons update immediately. The choice is stored in the current browser; other browsers keep their own choice.
Features
Three parallel providers — the CN side registers as the
traeprovider (e.g.DeepSeek-V4-Flash,DeepSeek-V4-Pro), the enterprise side astrae-enterprise, and the international side astrae-global(the Gemini/GPT/MiniMax roster); all three rosters appear in the DSH model picker simultaneously: different sessions can each pick a side without interfering.Enterprise is a separate billing channel, not an alias for CN — the same CN credential, when it belongs to a
tob_onlinetenant, is served by two gateways: the consumer pool (billed against personal credits) and the tenant pool (billed against the enterprise allowance). Same model, two payers, so you choose who pays; the plugin never guesses.traenever touches the enterprise gateway, andtrae-enterprisenever falls back — a refusal is reported as a refusal instead of quietly re-running on personal credits. Enterprise is off by default: a personal-only account cannot use the tenant pool, so shipping it enabled would mean handing everyone a provider that fails on first use.Any panel can be switched off on its own — each tab carries its own checkbox (CN and international checked by default, enterprise not): unchecking withdraws that provider from the DSH model picker entirely (not merely hiding the tab) and stops all of its requests; checking it again restores it with the account, directory, picks, and context budgets intact. If you never use the international side, just uncheck it.
Enterprise models configured by the tenant now show up — a tenant can configure models of its own in the Trae enterprise console. Those rows (
config_source: 2) are absent from the enterprise-side Remote directory, so the plugin used to hide them entirely; they now appear on the enterprise panel and in the DSH picker. They are not callable yet: those models are client-direct (use_remote_service: false, carrying their ownbase_url) and the plugin has no transport for that channel, so selecting one fails honestly (4001→ this SOLO function does not serve it) instead of failing silently or pretending to answer. They bill the tenant pool, which is why they appear only on the enterprise panel; CN and international are untouched — those two read consumer-gateway rosters to begin with.Tabbed settings card — the card's top carries a "Domestic / Enterprise / Global" tab bar; each tab holds its own account picker, usage overview, and model management. Account, directory, selection, and unsaved drafts are fully isolated per tab — switching accounts or refreshing models on one tab never touches the other side's runtime catalog or sessions. CN and enterprise share one CN credential pool but keep separate account bindings and model picks: the two rosters differ (
DeepSeek-V4.1-Flashis listed only on the enterprise pool), so picks never overwrite each other.The card then splits into "Account / Models / Diagnostics" (learned from the sibling
dsh-connect-workbuddy). The region row above is the scope — which provider this whole card is about — while these are sections of that one card: Account covers who serves, what is left, the check-in and the pool; Models covers which models to tick, image input, the context budget and Save; Diagnostics read-only lists the panel, the provider id, the serving account, both token deadlines, the catalog/enabled model counts, whether the pool and the check-in are offered, and the verbatim text of this panel's last reported failure. As of 4.4.7 the diagnostics section carries one more line, "quarantined copies": a credential copy that could not be read — and was therefore renamed aside instead of being erased — is named there, together with how many accounts it still holds. "Where did the account I remember go?" is now answered by the card instead of by browsing~/.dshfor a file name; the signed-out screen shows the same notice, because that is the screen a user lands on after an account disappears. The split exists because the two halves commit differently: an account change lands on the click, a catalog change is a draft until Save — so a single long column put the save button three screens away from what it saves. Switching sections never refetches, never drops a half-filled model draft, and never rebuilds the pool's log. A signed-out card renders no section strip, so its one screen of instructions cannot be hidden behind a tab the user cannot see. The Models section lays every model out at once, with no inner scrollbar — it is not a little window scrolling inside a page that already scrolls; the card's own page is the only scroll.Multiplier in the model name — model names show the credit multiplier in Trae's own menu format (e.g.
GLM-5.2 · x0.79), updated with each directory refresh.Promotion badge — Trae publishes its discount rules in the model directory (
activity_discount: pay ratio, list price, off-peak windows with their time zone). The plugin judges them against the clock at render time and paints one capsule beside the model name (5 折/off-peak 5 折/limited 5 折), with the old price, the new price and the window on hover. Judging at render time is what keeps a night-time discount from still hanging there the next morning; when upstream says nothing is discounted right now no badge is painted, the multiplier is never used to guess a promotion, and no campaign without an end time is labelled "limited". It is information only: no request and no billing changes, and the international region (subscription) has no such data and therefore shows no badge. See docs/PROMO_BADGE.md. The same capsule is drawn in DSH's own model picker (the host'sconversation.input.model.labelslot), where the choice is actually made — a badge you only read in the settings card arrives after you have already picked. In the picker the multiplier appears exactly once: the catalog rate embedded in the name is pulled back out and, while a discount runs, replaced by the discounted price (same clock, same data as the card), and opening the picker triggers no extra upstream read. And the plugin also publishes its own selector badge now: throughLlmModelInfo.badgeit hands over the promotion running right now (5 折/off-peak 5 折/limited 5 折), from the same data and the same judgement the card uses. The clock is read where the host rebuilds the catalog (listModels()), so a closed window stops appearing, and one instant covers the whole directory. The picker's label slot issingle, so the plugin that wins it draws every provider's rows; a connector that publishes no badge has bare rows the moment another plugin holds that cell.DSH local tool loop — gets pending structured
tool_callsfrom Traellm_utils_chat, lets DSH execute its own local tools, then returns tool results to the model.Text-to-image (
trae_draw_image) — brings the signed-in account's Trae text-to-image service into the conversation: the model draws one image and the plugin fetches the bytes too, writes them under the session cwd and shows the picture inline. Off by default, enabled per panel — generation really spends credits (measured: ~8.8 for one1920x1920on CN personal), so unlike the image-input declaration it only happens when you say so. Protocol, size bounds, the two-step fetch and why the old "fetch" GET is really a second generation are in "Text-to-image" below.Dual-region detection (CN / international) — detects local sign-ins across Trae CN, TRAE SOLO CN, Trae, and TRAE SOLO installs. The region is derived from the credential's own
userRegionclaim (host suffix and edition label as fallbacks), with no manual switch. The US cluster (userRegion: "US"/*.traeapi.us) is recognized but not served yet: a US credential is never routed to the Singapore gateways; the account panel names the account and says the region is unsupported, and that signing in again changes nothing (issue #66).Region-isolated directories and selections — CN and international each keep their own model directory, enabled picks, image opt-ins, and context budgets, and each provider reads only its own slot.
Vision follows Trae's own declaration — when Trae marks a model
multimodal, the plugin advertises it as such with no manual tick per model (issue #16). The rule is "models you tick ∪ models Trae marks multimodal": models Trae marksfalse, or does not mark at all, stay text-only and can still be turned on by hand. A row enabled automatically is shown ticked and read-only, with the reason. See "Image input" below.Account switching — refreshes the token list and lets users select an account without storing tokens in DSH settings. Your choice is remembered and stays in effect: the plugin will never switch accounts on its own just because the bound one ran out of credit or another usable one was found (switching bills a different person). So when the bound account is exhausted the card says so explicitly and lists the other accounts on this machine that still have credit, with their balances, for you to switch to in one click — instead of showing an empty panel or quietly rebinding you. "Refresh accounts & tokens" now always reports what happened (how many accounts were found, who is still bound) instead of appearing to do nothing. The dropdown names the product (
Trae/TRAE SOLO/ international) so a credential left behind by an uninstalled app is recognisable.Read-only usage and model management — Work/general credits on CN accounts, subscription/trial status on international ones; enable Trae models freely. Read-only queries consume nothing.
Per-model thinking level, and the default is no longer just
Default— Trae's directory has always published each model's own default level, and the plugin has always parsed it into the catalog, but it was never reported to DSH. The model picker could therefore only sayDefault: you could not see which level a model would run at, and you could not pin a different one. The adapter now reports that level, the host materialises it into every request that names none, and each model that declares levels gets a dropdown whose first entry names the level it will actually run at (e.g. "Default (high)"). Precedence is your choice > upstream default > that model's own middle tier; choosing "Default" DELETES the key rather than storing a level that happens to equal today's default — the latter looks identical while quietly pinning the choice, so the model would stop following upstream. A saved level the directory has since withdrawn is ignored rather than sent, because sending it is rejected withUNSUPPORTED_REASONING_EFFORT. Choosing nothing behaves exactly as before.Credit-near-expiry notices — the remaining balance only says "how much is left", not "which pack lapses first". The notice escalates by urgency (7 days → 24 hours → already lapsed) and names the amount, the pack count and the soonest expiry, so a user watching only the total never silently loses the pack that expires first. Shown in both the usage card and the composer credits panel on the CN side (the international side is subscription-based and has no per-pack expiry).
One-click test of the enabled models — sends each enabled model one minimal message (a single
ping, no tools) and reports whether it actually answers: works / needs a higher plan (Trae1005; your plan does not cover it) / not served (4001; no SOLO function serves it) / throttled (4011; Trae rate-limited that route) / sign-in rejected / not determined. The last one is a first-class outcome: a timeout, a dropped connection, a proxy or a 5xx is never reported as unusable — only an explicit upstream refusal is a negative verdict. This is the plugin's only operation that spends quota (check-in changes account state but spends nothing), it runs only when you click, and its results live in the current session rather than in your settings.4011is a rate limit, not "this model is unavailable" (measured for issue #33): an exhausted balance reports a different code,4008, so "I still have plenty of credits" and "I got a 4011" are both true at once. A throttled model answers again after a short wait — do not delete it.4017(Trae's risk control temporarily restricting the account) also reports throttled and cools down the same way, while4008means the quota is exhausted — with the account pool enabled the request moves to the next account, and with the pool off the refusal is reported as it is.One-click test of all models — the same probe applied to every visible model of the current region, not just the enabled ones. Use it when you want to know whether the models you have switched off could still answer — after a plan change, or after Trae reshuffles its lineup.
Daily check-in claiming (per account) — on the CN card every account row carries its own check-in button, with the day's reward written on it (
Check in +150). A row reads Claimed and disables itself once that account has been paid, and reads Device used and disables itself when this machine has already spent today's slot through some other account — the two are reported honestly, and the second is never dressed up as "claimed". This is the plugin's only operation that changes account state, and it runs only when you click; one click targets that one row's account and sends exactly one request. There is deliberately no "claim for every account": Trae allows one check-in per device per day (switching accounts does not reset the slot), so a sweep could only manufacture a row of false failures. The international side has no check-in activity, so no button is shown there.Composer readout — the composer tool row (between "Expert" and the model selector) shows a clickable readout, refreshing every 5 minutes by default (the interval is configurable — see the next bullet). Both regions show it, but they do not show the same quantity, and that is the data's doing: the CN side is credit-based, so it reads "Trae CN · "; the international side is subscription-based and its usage document carries no credit field at all, so it reads "Trae Global · " (e.g.
Pro/Free). The whole readout is clickable and opens a panel showing a TABLE: one row per account in the region — general credits on CN, plan on international — where clicking a row SWITCHES accounts (through the same mergedaccountswrite the card uses, so the other region's selection survives). The panel's top right carries two controls, Refresh and Settings (as of 4.9.0 the Settings button targets the settings panel; an interim revision removed it on the belief that this was impossible, which was wrong — the host publishes no id-targeted service, but the settings shell pins its store seat to the registration soslots.entries('sidebar.settings')[0].store.create().actions.openSection(id)is a real route, and the host's own tests drive the dialog exactly that way). While Refresh runs its icon turns: the batch is serial, so the slowest account decides when it stops. Refresh asks every account checked into this panel's account pool to answer once (through the pool'saction=testroute — the same batch the pool section's own button runs) and reports the outcome in the panel's foot:Pool tested · 2 of 2 answered. Two things about that press the label cannot say, so both live in the tooltip and in the foot line: it tests the pool's checked-in members, not every account in the table you are looking at, and it is the only press in this plugin that spends credits (one minimal ping per member) — a bare "Refresh" reads as free, so the tooltip is worth reading. To change anything, open Settings → Trae — the plugin's only configuration surface. The balance needs no refresh button of its own — it re-reads when the panel opens, on every account switch, and on every refresh interval, which is why that button was replaced rather than joined by another. It appears only while the session's selected model belongs to this plugin, and renders nothing for any other provider — which is what keeps two connector plugins from competing for one shared row (the sidebar foot is a shared root row; the composer row is per-session and provider-scoped).Where that readout sits is a choice (learned from the sibling
dsh-connect-workbuddyissue #62). The default is the composer toolbar (the position described above); if another plugin occupies it and the readout does not appear, move it below the input box — the row carrying the round / step / token statistics, where the readout is APPENDED after the shipped figures rather than replacing them. The seat is set per panel (all three are stored separately), in the card's settings block next to the "show credits in the composer row" checkbox. Why a second seat exists at all: the composer toolbar is a shared list slot that the shell's own controls and every other plugin register into, and a shared slot cannot promise that every occupant is visible — the report behind that issue is a readout that vanished entirely once a third-party plugin was installed (this plugin has been squeezed out of a shared row once before too, down to a clipped "Tr" at the sidebar foot).The automatic-refresh interval is configurable — "refresh every" under Settings → Trae → Capabilities decides how often the card and the composer readout re-read usage by themselves: 1 / 5 / 10 / 30 / 60 minutes, 5 by default. One value for the whole plugin, not one per panel: both surfaces hit the same two read-only routes, so a per-panel copy would make one screen refresh at two cadences. A change takes effect immediately — the old timer is cleared and its in-flight read aborted before a new one starts at the new period, so a change cannot leave two loops running. A shorter interval means more requests: each refresh is two read-only upstream requests and nothing here spends credits. Before this setting the card was hardcoded to 60 seconds while the composer readout was hardcoded to five minutes — two cadences for the same data, decided by which surface you happened to be looking at. Both now read this one field.
Optional: put Trae in the sidebar (learned from the sibling
dsh-connect-workbuddyPR #188, and off by default here too). Ticking "Show Trae in the sidebar" in the card's settings block adds a Trae row to the DSH sidebar; it opens the full-page version of this same card — same region tabs, same account / models / diagnostics sections, minus the card frame, with a title, a description and "Back to conversation" at the top. Why it is off by default: the sidebar's global rows are the host's own pages, and this row claims a seat every installed bundle shares while the settings page already reaches the same content — a nav row nobody asked for re-arranges a surface this plugin does not own. It takes effect on the click with no Save: writingsidebarPanelregisters or disposes the row in the same second (it is not a component rendering null — that would leave a blank but still clickable button), and switching it off while the page is open sends the centre column back to the conversation by itself. The page's back control goes through the host'slayout.selectPanel(null); on a host without that service the control is omitted rather than drawn dead.Secure loopback shim — one random port + in-process random secret per region; the real Trae token is never handed to pi-ai.
Daily automatic check-in
The domestic personal account pool offers automatic check-in, disabled by default. Enable and save to check in selected members while DSH runs. Progress survives restarts and failed attempts retry with backoff. This setting is independent of automatic billing selection. Trae limits daily rewards per device, so not every member can receive a reward. Global and enterprise panels do not offer automatic check-in.
How it works
DSH PiAiAdapter (one stack per provider)
-> secure loopback shim (one random port + in-process random secret per region)
-> TraeSoloBridge
-> CN: https://trae-api-cn.mchost.guru/api/agent/v3/llm_utils_chat
-> Enterprise: https://console.enterprise.trae.cn/api/agent/v3/llm_utils_chat
-> Global: https://coresg-normal.trae.ai/api/agent/v3/llm_utils_chat
-> Trae SSE / pending function_call
-> OpenAI SSE tool_calls
-> DSH executes local tools and returns their results
Each panel owns a complete runtime stack — credential store, model catalog, wire map, upstream clients, loopback shim, adapter — with visibility filtered by the credential's own region claim, so accounts from several regions can be signed in and used by different sessions at the same time.
A panel is not a region. cn and ai happen to line up with the two regions, but the enterprise pool shares the cn credentials while billing a different account and serving a different roster — it needs its own switch, its own account binding, and its own model picks. That is exactly what a "panel" is. Keeping panel and region as two concepts lets enterprise ride the same settings pipeline with no change to the stored shape: it is just another slot in the regions map.
The CN region therefore publishes two providers side by side, and the route is fixed when the provider's client is built — there is no "guess once per call". The shim exposes one bearer route per provider and dispatches by bearer; an unknown token gets a 401 rather than falling back to the first route. The enterprise gateway requires a session_id on every call while the consumer gateway rejects a body carrying one, so it is added only on that route.
Usage overview hits the read-only https://api.trae.cn/trae/api/v2/pay/* and /trae/api/v2/ug/* endpoints (international accounts read their own gateway's subscription status); the daily check-in claim is the one write among them, going to POST /trae/api/v2/ug/checkin_credits/claim with this installation's device id (x-device-id, the same identity the chat path sends). That device id is also what Trae keys the "one check-in per device per day" rule on, so switching accounts does not reset the day's slot. Refreshed tokens are kept per region in $DSH_HOME/.trae-auth.cn.json and $DSH_HOME/.trae-auth.ai.json (two simultaneously signed-in accounts never overwrite each other; the legacy single file .trae-auth.json is still read as a migration source).
See
docs/IMPLEMENTATION_PLAN.md,docs/SOLO_ROUTE_DECISION.md,docs/USAGE_API_RESEARCH.md.
Relationship to other plugins
This plugin does not interoperate with any other plugin. That is a boundary, not a slogan:
- No shared state. Accounts, credentials, the model directory, the account pool, access tokens and the device id belong to this plugin alone; it reads and writes only its own files (
$DSH_HOME/.trae-auth.*.json,.trae-auth.deleted.*.json,.trae-pool.*.json) and its own settings namespace — it does not read, write, or supply data to any other plugin. It does edit the Trae desktop app's own sign-in file, but that is another application, not another plugin. - No cross-plugin account or credit scheduling. The pool ranks and switches only among this plugin's own accounts; a
traefailure is a failure — it never borrows another connector plugin's account, credit or channel, and never hands a request to another plugin to retry. The reverse holds too: no plugin can send requests through this one. - No slot negotiation. Whether the card and the composer readout appear is decided by whether this plugin's provider is selected (read from DSH's own
modelSelectionprojection), not by plugin-to-plugin messages allocating space. Two connector plugins installed together coexist because each appears only for its own provider — that is non-interference, not collaboration. - No shared switches. Turning one panel off withdraws only this plugin's provider and requests; it never changes another plugin's provider, models, binding or settings.
Why the boundary exists. Once plugins depend on each other, any upgrade, uninstall or version-line change silently alters the behaviour of its neighbours — and DSH's load order, parallel versions and user-authored profiles make that coupling impossible to express reliably. Holding the boundary keeps "who is broken" answerable with one plugin instead of a chain.
Sibling plugins learn from each other (lessons from
dsh-connect-workbuddyare quoted in this repository's comments and tests) but never call each other — learning is a compile-time affair, interoperation is a runtime one, and the two must stay apart.
Image input
The plugin declares whether a model accepts images, and DSH uses that to decide whether an attachment is sent as-is or degraded into a text description. That makes the declaration a hard switch, not a cosmetic label.
The rule is the union of two sources (issue #16):
| Source | Meaning |
|---|---|
Trae's own multimodal field |
Trae's own answer to "does this model read images". The Trae IDE's attach-image button is driven purely by this field, with no user switch |
Your manual imageModelIds ticks |
Explicit choice. Even if Trae later stops reporting the flag for that model, your tick is never revoked |
Notes:
- Only
multimodal === trueenables it automatically. A missing field (a directory saved by an older release, a fallback row) or an explicitfalsestays text-only — better to not send than to advertise a capability we cannot confirm. - Automatic does not mean automatic sending. It only lets DSH attach an image to that model; you still choose to attach one per message. The plugin never sends an image on your behalf.
- An automatically enabled row is shown ticked and read-only. Under the union, unticking it would be re-applied immediately, so offering a clickable box would be a lie. There is currently no per-model "force off" escape hatch; if you want one, say so on issue #16.
- Manual ticks still work for models Trae marks
false(or does not mark), which is the escape hatch for "upstream does not say so, but it actually works".
Text-to-image (trae_draw_image)
The text-to-image service behind TraeWork / SOLO is now reachable from a DSH conversation: the model draws one image and the result is written to a local file.
Off by default, switched on per panel. Generation really spends credits (measured: ~8.8 for one 1920x1920 on CN personal), so this is not the image-input kind of declaration — it is an explicit spend gate. Tick "Allow the model to generate images" (drawImageEnabled) in the card's model column and that panel's trae_draw_image gets registered with DSH; unticking removes it immediately. Each panel stores its own switch; the enterprise and international panels do not offer one — the former's tenant gateway is a separate billing surface, the latter bills under another plan, and neither has been measured, so the plugin does not pretend otherwise.
The protocol (all measured, none of it guessed from the binary):
| Item | Fact |
|---|---|
| Endpoint | POST /api/ide/v1/tool_text_to_image (plus an SSE variant ..._stream), model seedream_5 |
| Request body | Only {prompt, image_size?}. Adding known fields (mode_type / session_id / image_urls / watermark) earns a 400 with an empty body; unknown fields are ignored |
| Success | Flat {"message":"success","uri":"tos-cn-i-…/cn/<uid>/gen_image/<ts>_<hex>_jpeg_1920x1920"} — no {code,msg,data} envelope |
| Sizes | Total pixels must land in 3686400 ~ 16777216: 1024x1024 is rejected as too small (code 3003, no charge) and 4608x4608 as too large; presets 2k/3k/4k work, default is 1920x1920 |
| Fetch | Two steps, no extra charge: POST /api/ide/v1/get_resource_url whose body must be exactly {"uri_list":["<key>"]} ({uri}/{path}/{resource_uri}/{uris:[…]} and GET ?uri= all answer 200 with an empty url_map), replying {"url_map":{"<key>":"<byteimg signed URL>"}}; then a plain GET of that signed URL (no Trae headers — the signature is in the query) returns the bytes: measured image/jpeg, 1,155,578 bytes, header ffd8ffe0 |
| What that GET really is | Decisive probe: after the POST returned …/1792954795741_44f94116_jpeg_1920x1920, the GET with the same (prompt, size) came back with a different uri (…/1792954810505_b107ac11_jpeg_1920x1920) after 27 s and zero pixels — a second image and a second charge (~17.6 for the pair). The illegal-size probe agreed: the error is Ark's own [callArkImageGeneration] |
The bytes really do come back. On success the tool returns url (the Trae object key, kept for diagnostics), path (a local file relative to the session cwd, e.g. trae-images/trae-20261026-042015-ab12cd.jpg), model, prompt, size and a hint; the renderer emits  — DSH's chat resolves that relative path against the session cwd and reads the bytes through the host's authenticated api/file route, so the picture shows up inline. Only when the bytes genuinely could not be fetched (IMAGE_UNAVAILABLE: the image was generated and charged) does it fall back to inline-code "key only", and such a failure still starts the 30-second cooldown — generation is billed per image, so a retry buys another one.
Image editing and text-to-video are not opened up. Editing needs a TOS upload presign first (this plugin has no such path); video polls a material result — a separate async pipeline. Neither ships, and neither leaves half an entry point behind.
Model coverage
This plugin serves models from Trae's SOLO channel (DeepSeek-V4-Flash-Official, DeepSeek-V4-Pro-Official, GLM-5.3, GLM-5.2, Kimi-K3, MiniMax-M3, Qwen3.8-Max, Doubao-Seed-*, …), for both the domestic and international sides.
The following two models currently come from the TraeCode (Trae IDE) channel and have not been opened up to the SOLO channel:
| Model |
|---|
kimi-k2.8-preview |
qwen3.8-flash |
They do appear in the model list (Trae's directory advertises them), but the plugin has no channel that can call them yet. Sending a message with one selected produces an explicit error, for example:
Trae does not serve this model under the SOLO function the request used
(config_name rejected) · Trae code 4001 · upstream: We're sorry, the param is invalid…
That is the upstream refusal stated plainly, rather than a silent failure or something that reads like a network fault. Once Trae opens them up to the SOLO channel the plugin picks them up automatically (the test is simply whether a callable id can be resolved) — no plugin upgrade needed.
Why they are listed now (policy from 2026-10-02): such rows — present in the directory but with no resolvable callable id — used to be hidden outright, on the grounds that showing one only produces an error. But the callable rosters are issued per account tier: not seeing a model on a free account does not prove a paying account cannot call it (the reporter in issue #19 is on Pro, and their account calls models this machine's free account gets gated on). Hiding models the user's own Trae IDE lists is worse than showing an explicit error, so the behaviour is now: list everything, report refusals honestly.
deepseek-v4.1-flashused to be listed here —docs/DS41_CALLABILITY.md(evidence gathered 2026-09-15) measured4001 param is invalidfrom all eight SOLO functions. Trae has since opened it up to the SOLO channel: it now ships in the live directory withwireFunction: solo_work_remoteand calls succeed (verified against a live refresh). This page had not caught up, so it is removed from the table.
glm-5.3-flashused to be listed here too, and is removed as of 4.4.0: Trae has since opened it up, and it now ships in the live wire roster withwireFunction: solo_work_remote(verified). The directory side always advertised it — it was listed because the Remote directory named it while the wire roster did not, so it had no callable id and never entered the callable roster. 4.4.0 fixed both "the wire has it but the directory does not" and "the directory was asked for too few groups", and it now appears as an ordinary callable model.
Note the distinction:
GLM-5.3is supported (it goes through the SOLO channel).glm-5.3-flashis now supported too — it was always a different model fromGLM-5.3, but it has since been opened to the SOLO channel.
To use these two models today, use the Trae IDE itself.
Max output and context budgets
The "最大输出" (max output) on the model card comes from model_detail_list[].max_tokens in Trae's get_detail_param — upstream does publish it (live-verified: 80/80 CN configs carry it). As of 4.0.1 the value travels through the catalog merge all the way to the card, /models/refresh and DSH model registration; before that the merge step dropped the field, so the whole region rendered blank (issue #42 — full diagnosis in docs/ISSUE42_DIAGNOSIS.md). Rows that are still blank are being honest: models the directory lists but the SOLO roster has no config for (the three TraeCode rows above) have no candidate value to show — we prefer a blank over an invented cap. The value is metadata only; the plugin never puts max_tokens into request bodies (the server decides the real cap).
Context windows are a per-model choice between Trae's default (dev) window and its Max window — and, as of 4.4.8, a 500K middle step for wide-window models — stored per panel as contextBudgets. 500K is not an upstream-advertised window; it is a local half-way point. Dev windows are typically 200K/256K/272K and Max is typically 1M, so going straight from default to Max is a 5× jump, and Max-tier billing is not what every session needs. It is therefore conditional: the option only appears when that model's Max is at least 500K, and 500K is genuinely wider than its dev window and narrower than its Max. applyContextBudgets validates against the same rule (contextBudgetOptions), so a stored value that is not one of that model's selectable windows always falls back to the dev window — it can never push a model past a window it does not have (if upstream later shrinks a model's Max to 256K, a stale 500K quietly stops applying instead of overflowing).
For a whole-region switch, the model section has three buttons: "Switch all to 500K" (writes 500K for every row whose Max is at least 500K, leaves the rest alone), "Switch all to Max" (writes each Max-capable row's maxContextWindow, leaves no-Max rows and existing manual budgets alone) and "Restore default context" (clears the region's budget dict). All act on the draft and take effect on Save, producing exactly the same stored shape as the per-row radios (issue #42 side request — 18 Max rows in CN used to mean 18 clicks).
Install
dsh plugin --profile desktop add dsh-connect-trae
Or directly via npm:
npm install dsh-connect-trae
Restart the DSH process after install/update/uninstall.
DSH version compatibility
Requires DSH 0.1.7-rc.1 and up (since 2.3.0 the plugin no longer targets hosts older than 0.1.7; the peer dependency ranges are narrowed accordingly).
The peer upper bound is <0.3.0-0, so both the 0.1.7 and the 0.2 line are supported (including 0.2.2-rc.1, verified).
Both pi-ai context generations are supported (since 3.4.2)
DSH itself spans two generations of @earendil-works/pi-ai, and which one this plugin resolves to is decided by your install, not by the host — declaring it a peer is correct, but the two generations disagree on what a context looks like:
| legacy (≤0.85) | modern (0.86+) | |
|---|---|---|
| shape | { systemPrompt, tools, messages } |
{ messages: [ {role:'system', content, toolsAdded}, … ] } |
| system prompt | top-level systemPrompt |
only on that system message |
| tool declarations | top-level tools |
only on that system message's toolsAdded |
A mismatch breaks in both directions, so since 3.4.2 the plugin adapts bidirectionally according to the generation it resolved (issue #27):
- Modern host + legacy library: a guaranteed crash — the legacy token estimator has no
role === 'system'branch, so it iterates a string and throwsCannot read properties of undefined (reading 'length'). This happens before the request is built, which is why it looks like "every model crashes, within milliseconds, with all-zero usage". - Legacy host + modern library: no crash, but the modern api reads only that system message and silently ignores the top-level fields — the system prompt and every tool declaration are lost, so the model can never emit a tool call. Quieter, and also fixed.
The generation gate is the copy this plugin resolved (its manifest version; package layout when that is unreadable), not the host version — a nested older copy shadows a newer host copy and vice versa. Startup logs one line, dsh-connect-trae: pi-ai <version> (<generation>); legacy means your install resolved to the ≤0.85 line.
The boundary is 0.86: dist/utils/transcript.js, normalizeContext, the estimator's system branch, and the switch away from the top-level fields all land in 0.86.0 together. Gating on 0.87 misclassifies 0.86.x as legacy and folds a context the modern api consumes natively, destroying the prompt and the tools.
The 0.2.0 line breaks no contract this plugin consumes — a symbol-by-symbol check confirmed every API it imports is unchanged (full 0.2.0-rc.1 impact check). But since 0.1.7 DSH enforces a bundle-level peer gate: a bundle whose peers are unsatisfied is skipped whole, with one line on stderr and nothing in the UI — the plugin simply disappears.
DSH 0.2.1 line (pi-ai 1.1.0) sync
The 0.2.1-rc.1 host moved @earendil-works/pi-ai from ^0.85.1 to ^1.1.0 (unchanged from 0.2.1-rc.2 through 0.2.1-rc.5) — the only change on the 0.2 line with real behavioural impact. Three conclusions:
- The request body did not regress (measured, not inferred). The 1.1.0 api reads the prompt only from a transcript system message and never touches top-level
systemPrompt/tools, whiledsh-llm-pi-ai'spiContext()still emits the legacy envelope. The bidirectional adapter this plugin has shipped since 3.4.2 covers exactly that: feeding the real host envelope through real1.1.0with a local SSE capture yieldsroles: ["system","user"], an intact system text andtools: 1; without the adapter it degenerates toroles: ["user"], systemnull,tools: 0— with no error. That contrast is pinned as a wire-level matrix intests/pi-ai-context.spec.ts. - Types were fixed. 1.1.0 changed
ProviderStreams' second parameter to a brandedTranscriptContext(aunique symbolonlynormalizeContext()can produce). The adapter casts once at that single boundary (withContextAdaptationinsrc/adapter.ts) and documents why the brand cannot be obtained honestly there. - The peer range needed no change. DSH evaluates with
semver.satisfies(runtime, range, { includePrerelease: true })and checks only the@deepseek-ai/dsh*namespace, so>=0.1.7-rc.1 <0.3.0-0already admits every release from0.2.1-rc.1through0.2.1-rc.5(verified). Note the prerelease cliff only exists under default options — it is not this plugin's situation.
The dev tree pins @earendil-works/pi-ai at exactly 1.1.0 (the version the host actually bundles — still 1.1.0 on 0.2.1-rc.5) rather than ^1.1.0, so local typecheck and tests run against the same contract users do; the schemastery override moved to 3.18.5 (dsh-llm-pi-ai@0.2.1-rc.5 declares ~3.18.5).
0.2.1-rc.3 sync (since 4.4.6)
The host moved to 0.2.1-rc.3 (the desktop app's CFBundleVersion and the bundled dsh-desktop-runtime both report 0.2.1-rc.3). Upstream shipped five commits: three of them are the new "navigation entry customization" UI (pin/unpin plugin launchers, a More menu, analytics), one switches the DeepSeek API-key route to the official /models listing, one is the version bump.
For this plugin:
- Of the 13 host packages the plugin consumes, only
dsh-client-ui-primitiveschanged code, and every change is additive:Tooltip'sTooltipSidegains'left'and now places the bubble from measured border boxes (preferred → opposite → perpendicular side),MenuItemButtongainscurrent,MenugainsminWidthFromAnchor, and the icon set gainsIconAppsAddOutline*. This plugin referencesdsh-client-ui-primitivesat the type level only (import type {} from ...) and never touches those components at runtime, so no adaptation is needed. - The other 12 packages (
dsh-llm,dsh-llm-pi-ai,dsh-settings,dsh-host-webserver,dsh-atomic-write,dsh-home-paths,dsh-attachment,dsh-client-ui-renderer,dsh-client-ui-settings,dsh-client-ui-settings-plugins,dsh-client-ui-slots,dsh-client-locale) are byte-for-byte unchanged. - Every slot this plugin registers (
plugins.bundle.config,plugins.row.config,conversation.input.left,conversation.composer.dock,conversation.input.model.label) still exists with an unchanged contract on rc.3; the host's new slots (e.g.conversation.session.header.views.actions) do not overlap with them. - The peer range needs no change:
0.2.1-rc.3is admitted by>=0.1.7-rc.1 <0.3.0-0(verified).
Details: section 10 of docs/DSH_0.2.1_RC1_SYNC.md.
0.2.1-rc.5 sync (since 4.6.6)
The host moved to 0.2.1-rc.5, through rc.4. Of the 13 commits between the two releases, roughly 240 files are nothing but version-bump lines in each package's package.json; only four carry real code: ACP/MCP moving catalog-load diagnostics off stdout to stderr, View tab tooltips shown only when the label overflows, the More-menu tooltip losing its dynamic copy, and custom thinking-block rendering.
For this plugin:
- The 13 host packages it consumes are byte-for-byte identical between rc.3 and rc.5 — including
dsh-client-ui-primitives, the one package that had changed on rc.3. Zero adaptation. - rc.4's only behavioural change is to the
conversation.chat.reasoning.bodyslot: it gainsrawText, andtextbecomes the display-ready text (with a leading<signature>…</signature>block stripped). This plugin registers and consumes noconversation.chat.*slot at all, so it is not affected. - rc.4's reason for moving diagnostics off stdout is that "ACP reserves stdout for protocol messages". This plugin's host half never writes to stdout (no
console.log/info/debug, noprocess.stdout.write); diagnostics go to the card's own diagnostics panel. That fix is therefore a precondition already satisfied, not a pattern to follow. - All five slots this plugin registers still exist with unchanged contracts on rc.5.
- The peer range needs no change: both
0.2.1-rc.4and0.2.1-rc.5are admitted by>=0.1.7-rc.1 <0.3.0-0.
Details: section 11 of docs/DSH_0.2.1_RC1_SYNC.md.
0.2.2-rc.1 sync (since 4.8.1)
The host moved to 0.2.2-rc.1. This release is not just version bumps: the bundled dependencies move as a set (cordis 4.0.5 → 4.1.0, schemastery 3.18.5 → 3.19.0, @earendil-works/pi-ai 1.1.0 → 1.3.0), and 8 of the 13 host packages this plugin consumes carry real changes.
For this plugin:
- One contract break:
dsh-llm-pi-aiadded two required fields toResolvedPiAiProviderProfile—maxRequestImagesandimageOffloadCountQuantum. This plugin builds that profile by hand from the live catalog (it bypasses the host's config resolution), sopnpm typecheckfails withTS2739after the bump. Both are now declared inREQUEST_IMAGE_BUDGETSwith the host's own defaults,50 / 10. - Runtime was never broken: the host only defaults those fields on its config-resolution path; a hand-built profile that omits them takes the "image count unchecked" branch on 0.2.2. That is why 4.8.0 keeps working there (verified on the desktop host:
GET /plugins/dsh-connect-trae/usage→ 200,signed-in). - **New capabilities ad
…
Links
More in this category
Ebony-Vinyl/dsh-our-free-model★ 70217
Adds free model lanes to DeepSeek Harness — DeepSeek V4.1 Flash, Kimi K3 and others — with no login, sign-up or API key, plus a local OpenAI-compatible gateway, fallback routing and a usage dashboard.
dingminhua/dsh-connect-workbuddy★ 1467
Connects locally signed-in WorkBuddy models, CN and international alike, to DSH, reading each model's credit multiplier from the upstream catalog on every refresh, with per-model image input toggles, account switching backed by an auto-failing-over pool, manual daily check-in, and read-only credit overviews shown as compact pills on the card and in the composer.
Alice-Marx/dsh-model-router★ 955
Routes DeepSeek Harness work across configured model APIs and supported vendor CLIs with dependency-aware packages and cost previews.
V1ki/dsh-plugin-subscriptions★ 599
Use ChatGPT (Codex), Claude, and Grok subscriptions as DeepSeek Harness LLM providers, with Settings login, model catalogs, usage, plus image_generate, video_generate, and x_search tools.
XDTrees/dsh-workbuddy-xdpool★ 492
Merge every locally signed-in WorkBuddy account into DeepSeek Harness as one auto-failing-over model pool (multi-account rotation, live credits, and a model catalog showing per-model credit multipliers and free/night-discount tags).
XDTrees/dsh-xdpool★ 492
Merge every locally signed-in WorkBuddy account into DeepSeek Harness as one auto-failing-over model pool: multi-account rotation, 429 cooldowns, live credits, a model catalog with per-model credit multipliers and free/night-discount tags, QR-code login for 13 vendors, and aggregate free-tier channels. Accounts persist across restarts.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.