diff --git a/Cargo.lock b/Cargo.lock index ff1d8dee..d3da1b79 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3143,7 +3143,7 @@ dependencies = [ [[package]] name = "tw-api" -version = "0.65.0" +version = "0.66.0" dependencies = [ "serde", "serde_json", @@ -3154,7 +3154,7 @@ dependencies = [ [[package]] name = "tw-bedrock" -version = "0.65.0" +version = "0.66.0" dependencies = [ "aws-credential-types", "aws-sigv4", @@ -3175,7 +3175,7 @@ dependencies = [ [[package]] name = "tw-breaker" -version = "0.65.0" +version = "0.66.0" dependencies = [ "serde", "serde_json", @@ -3183,7 +3183,7 @@ dependencies = [ [[package]] name = "tw-config" -version = "0.65.0" +version = "0.66.0" dependencies = [ "blake3", "libc", @@ -3208,7 +3208,7 @@ dependencies = [ [[package]] name = "tw-control" -version = "0.65.0" +version = "0.66.0" dependencies = [ "axum", "base64", @@ -3250,7 +3250,7 @@ dependencies = [ [[package]] name = "tw-dialect" -version = "0.65.0" +version = "0.66.0" dependencies = [ "memchr", "serde", @@ -3259,7 +3259,7 @@ dependencies = [ [[package]] name = "tw-engine" -version = "0.65.0" +version = "0.66.0" dependencies = [ "serde", "serde_json", @@ -3272,7 +3272,7 @@ dependencies = [ [[package]] name = "tw-gateway" -version = "0.65.0" +version = "0.66.0" dependencies = [ "arc-swap", "async-stream", @@ -3322,7 +3322,7 @@ dependencies = [ [[package]] name = "tw-guard" -version = "0.65.0" +version = "0.66.0" dependencies = [ "base64", "bytes", @@ -3338,7 +3338,7 @@ dependencies = [ [[package]] name = "tw-link" -version = "0.65.0" +version = "0.66.0" dependencies = [ "serde", "serde_json", @@ -3352,7 +3352,7 @@ dependencies = [ [[package]] name = "tw-observe" -version = "0.65.0" +version = "0.66.0" dependencies = [ "tokio", "tracing", @@ -3361,7 +3361,7 @@ dependencies = [ [[package]] name = "tw-plugin" -version = "0.65.0" +version = "0.66.0" dependencies = [ "libc", "rand 0.10.2", @@ -3376,7 +3376,7 @@ dependencies = [ [[package]] name = "tw-pricing" -version = "0.65.0" +version = "0.66.0" dependencies = [ "arc-swap", "flate2", @@ -3389,14 +3389,14 @@ dependencies = [ [[package]] name = "tw-secret" -version = "0.65.0" +version = "0.66.0" dependencies = [ "thiserror", ] [[package]] name = "tw-store" -version = "0.65.0" +version = "0.66.0" dependencies = [ "blake3", "bytes", @@ -3416,7 +3416,7 @@ dependencies = [ [[package]] name = "tw-types" -version = "0.65.0" +version = "0.66.0" dependencies = [ "serde", "serde_json", @@ -3425,7 +3425,7 @@ dependencies = [ [[package]] name = "tw-watch" -version = "0.65.0" +version = "0.66.0" dependencies = [ "libc", "notify", @@ -3436,7 +3436,7 @@ dependencies = [ [[package]] name = "tw-yaml" -version = "0.65.0" +version = "0.66.0" dependencies = [ "saphyr-parser", "serde_yaml_ng", @@ -3446,7 +3446,7 @@ dependencies = [ [[package]] name = "twcore" -version = "0.65.0" +version = "0.66.0" dependencies = [ "anyhow", "axum", diff --git a/Cargo.toml b/Cargo.toml index faa7deca..af40f736 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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 ─────────────────────────────────────────── diff --git a/release-notes/0.66.0.md b/release-notes/0.66.0.md new file mode 100644 index 00000000..9b8fee93 --- /dev/null +++ b/release-notes/0.66.0.md @@ -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.