# Changelog [完整中文记录](./CHANGELOG.zh.md) All notable changes to this project will be documented in this file. ## [0.2.2] — 2026-08-14 Security patch and repository-maintenance follow-up. ### Fixed - Caught server exceptions are no longer copied into HTTP responses. Detailed messages stay in local logs; clients receive stable codes and fixed bilingual messages, preventing stack traces, local paths, and internal details from leaking through the Settings or artifact endpoints. - Dependabot no longer opens automatic major-version upgrades. Patch and minor updates remain automated; major upgrades require explicit compatibility review. ## [0.2.1] — 2026-08-14 Security, lifecycle, and first-time-maintainer community release. ### Fixed - Media provider endpoints now require HTTPS except for explicit loopback development hosts; embedded credentials, query strings, and fragments are rejected before any request is sent. - Empty media credential references now perform genuinely unauthenticated image-generation and connection-test requests with no Authorization header. - Subagent model selection is installed only after a validated rule hit and all installed listeners are removed when the plugin is disposed. - Browser source maps now resolve to the real `src/client/index.tsx` source. ### Added - A real repository and Git-history secret scanner, executable with `pnpm check:secrets` and required by CI. - A CodeQL workflow for public-repository analysis; private-repository Advanced Security is never enabled automatically. - Complete Chinese counterparts for public English documentation, bilingual community templates, a model-purchase strategy, an open roadmap, and a code of conduct. - A first-time-maintainer note that invites technical review and small, educational contributions without presenting the project as mature. ## [0.2.0] — 2026-08-14 Breaking architecture change: the plugin is now a **thin routing policy layer over the DSH native model registry** (option 1 of the V2 plan). ### Changed - Removed the duplicated agent model stack: the `openai-chat` adapter, provider registry, wire transport, and `mr:` route registration are gone. DSH 模型页 is the only provider/credential/catalog/modality/retry configuration entry. - Rules target NATIVE provider ids only; every hit passes `resolveModelInfo` / `resolveCallConfig` before the session header is written; failures use stable error codes and never touch the session. - No-match no longer force-routes (V1 `fallback` removed); the harness `agent-default-model` governs. - `model_route` is default-off and gated by an explicit allowlist; the tool exposes only the allowlist and still validates live at execution. - `reasoningEffort` is an opaque adapter-owned string (no fixed enum); adapter defaults are never written back into rules or session headers. - Media moved to the isolated `mediaProviders` namespace; V1 channels with `image_gen` migrate to `openai-images` in memory only (a user-confirmed save persists `schemaVersion: 2`). Vision chat is no longer claimed by the plugin. - Hardened media paths: https-only downloads with allowed hosts, ≤3 redirect revalidation, private-address/DNS-pinning rejection, 20 MiB streaming cap, timeouts, magic-byte image typing, and a realpath-fenced artifact preview. - 模型中枢 page rewritten: reads the official `llm.providers`/`llm.models` RPCs, refreshes on `llm/adapters-updated`/`settings/document-updated`, and shows active/dormant provider states, migration warnings, and Beta media channels (video/audio/3D marked not implemented). - Acceptance now separates direct and routing defaults, restores the exact deployment default after direct calls, and reports assistant block kinds without logging their content. - `defaultSize` now survives settings snapshot, edit, save, and projection roundtrips. Kimi K3 receives route-specific visible-output discipline at the official system-prompt assembly boundary; responses are never hidden or relabelled by heuristics. - Subagent children now install the official model-selection assembly, so a keyword rule reaches the child's first request instead of falling back to the parent's creation-time options. ### Added - `src/catalog.ts` (official directory + exact target resolution), `src/migration.ts` (pure V1→V2 migration + `toPersistedV2`), `src/media/types.ts` + `src/media/download.ts` (restricted downloads). - 161 tests: 154 runtime/regression tests plus 7 public-release contract tests, including entry lifecycle contracts (no `registerAdapter` / `registerModelDiscovery` / `mr:` in the V2 runtime). - Node 24-compatible pinned DNS lookups: when Node requests `lookup({ all: true })`, the downloader returns the complete set of already validated public addresses without weakening DNS-rebinding protection. ## [0.1.0] — 2026-08-14 Historical pre-V2 design record for `@dsh-external/dsh-model-router`. The public Git history does not contain a recoverable 0.1.0 release tag; use this section only to understand migration inputs, not as an installable release. ### Added - **模型中枢 Settings page** (`settings.section` id `model-router`): master switch, case-sensitivity switch, multi-category channel management (seven tags, adapter, base URL, credential reference, model list, default reasoning effort, price tier), per-channel connection test, keyword routing rules, fallback selection, current-effective display, and "apply to this session". - **`openai-chat` adapter**: dynamic registration/unregistration of channel provider routes (`mr:`) on the harness `llm` seam; OpenAI-compatible SSE translation, stable `LlmError` codes, per-operation connection facts (live settings changes without restart). - **Purpose isolation**: non-agent channels (`vision` / `image_gen` / `video_gen` / `audio` / `model_3d`) never enter agent routing candidates unless they also carry an `agent_*` tag. - **`model_route` tool**: manual session model switch through the durable `request/header` write channel (the `/model` channel), candidates limited to agent-capable channels plus host providers (e.g. `deepseek-official`). - **Keyword rule engine**: ordered first-match-wins, case-sensitivity switch, configured fallback; mounted on `agent/inbox/inserted`. - **`image_gen` tool**: single synchronous `images/generations` call on an `image_gen` channel with Artifact delivery into the session workspace, plus a read-only Web preview route. - **`async-job` adapter interface** (v2 reserved): submit/poll/cancel contract for video / 3D / audio generation. - Web routes: `/_dsh/model-router/settings` (snapshot / save / test / apply), `/_dsh/model-router/artifacts` (read-only image preview). - Red-light-first test suite covering config validation, adapter wire mapping, dynamic registration, isolation, rule engine, session write channel, tools, Web backend, and the release layout. ### Historical verification - DeepSeek Harness `0.1.0-rc.6` (web profile), Node 24. - Provider-specific live details were intentionally removed from the public changelog. Current verification belongs to the active release and CI.