Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ categories = ["network-programming", "web-programming::http-server"]

# 二进制走 CalVer,crate 走 SemVer —— 两者是两回事,卖给不同的人。
# 这里是 crate 的版本。
version = "0.65.0"
version = "0.66.0"

[workspace.dependencies]
# ── 内部 crate ───────────────────────────────────────────
Expand Down
14 changes: 14 additions & 0 deletions release-notes/0.66.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
This release lets an upstream's models be added by hand. An upstream that answers `/v1/models` but leaves out a model it serves — an account backend that hides newer models, a relay that lists only some — can now be given that model, and requests for it are routed there like for any listed model.

**Upgrade notes**

- The control-plane protocol version (`CONTROL_API_VERSION`) goes from 41 to 42. ThinkWatch Lite connects only to a core with the same protocol version: ThinkWatch Lite 2026.10.9 includes 0.65.0 (protocol 41) and does not connect to 0.66.0. A server used with it stays on 0.65.0 until the app is updated to a release that includes 0.66.0; `sudo twcore upgrade --version 0.65.0 --restart` switches a server back.
- The request store's schema is unchanged: upgrading from 0.65.0 keeps the request history.
- **`providers[].models` is now checked when the configuration loads.** An entry that is blank, has spaces around it, contains `*` or `?`, appears twice, or is longer than 256 characters is refused, and core starts in safe mode with an error naming the upstream and the model; fix or remove the entry. Before, such entries were accepted as written. A configuration that never wrote `models`, or wrote plain model ids, loads unchanged.
- Changed in the protocol:
- New endpoint `PUT /provider-manual-models` (`ManualModelsSave { provider, models, base_version }` → `ConfigWritten`): replaces one upstream's models added by hand, in the order given, and leaves the rest of its entry alone. An empty list removes the key.
- `ModelRow` gains `manual` (the model was added by hand) and `listed` (the upstream's own list has it).
- Message codes, compared with 0.65.0:
- New: `config.manual_model_blank`, `config.manual_model_padded`, `config.manual_model_wildcard`, `config.manual_model_duplicate`, `config.manual_model_too_long`.

**Models added by hand.** `providers[].models` used to be a fallback, read only when the upstream did not answer `/v1/models`. It now always counts: its models are offered by that upstream next to the ones the upstream lists, and are the whole list when the upstream lists none. A model on both lists appears once. Everything that asks which models an upstream has treats them the same way: routing and failover, aliases, routing rules that name a model, a key's allowed models, the gateway's `/v1/models`, the dry run and the speed test. `models_only` still limits what is used. Changing the list takes effect on reload, without asking the upstream for its list again.
Loading