diff --git a/Cargo.lock b/Cargo.lock index 9509e589..abd1bb6d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2492,7 +2492,7 @@ dependencies = [ [[package]] name = "tw-api" -version = "0.52.0" +version = "0.52.1" dependencies = [ "serde", "serde_json", @@ -2502,7 +2502,7 @@ dependencies = [ [[package]] name = "tw-breaker" -version = "0.52.0" +version = "0.52.1" dependencies = [ "serde", "serde_json", @@ -2510,7 +2510,7 @@ dependencies = [ [[package]] name = "tw-config" -version = "0.52.0" +version = "0.52.1" dependencies = [ "blake3", "libc", @@ -2534,7 +2534,7 @@ dependencies = [ [[package]] name = "tw-control" -version = "0.52.0" +version = "0.52.1" dependencies = [ "axum", "base64", @@ -2573,7 +2573,7 @@ dependencies = [ [[package]] name = "tw-dialect" -version = "0.52.0" +version = "0.52.1" dependencies = [ "serde", "serde_json", @@ -2581,7 +2581,7 @@ dependencies = [ [[package]] name = "tw-engine" -version = "0.52.0" +version = "0.52.1" dependencies = [ "serde", "serde_json", @@ -2594,7 +2594,7 @@ dependencies = [ [[package]] name = "tw-gateway" -version = "0.52.0" +version = "0.52.1" dependencies = [ "arc-swap", "async-stream", @@ -2638,7 +2638,7 @@ dependencies = [ [[package]] name = "tw-guard" -version = "0.52.0" +version = "0.52.1" dependencies = [ "base64", "regex", @@ -2651,7 +2651,7 @@ dependencies = [ [[package]] name = "tw-link" -version = "0.52.0" +version = "0.52.1" dependencies = [ "serde", "serde_json", @@ -2665,7 +2665,7 @@ dependencies = [ [[package]] name = "tw-observe" -version = "0.52.0" +version = "0.52.1" dependencies = [ "tokio", "tracing", @@ -2674,7 +2674,7 @@ dependencies = [ [[package]] name = "tw-pricing" -version = "0.52.0" +version = "0.52.1" dependencies = [ "arc-swap", "flate2", @@ -2687,14 +2687,14 @@ dependencies = [ [[package]] name = "tw-secret" -version = "0.52.0" +version = "0.52.1" dependencies = [ "thiserror", ] [[package]] name = "tw-store" -version = "0.52.0" +version = "0.52.1" dependencies = [ "bytes", "rusqlite", @@ -2711,7 +2711,7 @@ dependencies = [ [[package]] name = "tw-types" -version = "0.52.0" +version = "0.52.1" dependencies = [ "serde", "serde_json", @@ -2720,7 +2720,7 @@ dependencies = [ [[package]] name = "tw-watch" -version = "0.52.0" +version = "0.52.1" dependencies = [ "notify", "tempfile", @@ -2730,7 +2730,7 @@ dependencies = [ [[package]] name = "tw-yaml" -version = "0.52.0" +version = "0.52.1" dependencies = [ "saphyr-parser", "serde_yaml_ng", @@ -2740,7 +2740,7 @@ dependencies = [ [[package]] name = "twcore" -version = "0.52.0" +version = "0.52.1" dependencies = [ "anyhow", "axum", diff --git a/Cargo.toml b/Cargo.toml index e634b741..1a00cff7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -48,7 +48,7 @@ categories = ["network-programming", "web-programming::http-server"] # 二进制走 CalVer,crate 走 SemVer —— 两者是两回事,卖给不同的人。 # 这里是 crate 的版本。 -version = "0.52.0" +version = "0.52.1" [workspace.dependencies] # ── 内部 crate ─────────────────────────────────────────── diff --git a/release-notes/0.52.1.md b/release-notes/0.52.1.md new file mode 100644 index 00000000..9a555d7d --- /dev/null +++ b/release-notes/0.52.1.md @@ -0,0 +1,10 @@ +This release fixes two routing problems: a routing rule that rewrites the model was judged by the model the client asked for, and requests in the OpenAI Responses and Gemini formats were never recognized as part of a conversation. + +**Upgrade notes** + +- The control-plane protocol version is unchanged (25) and so is the request store's schema (21). ThinkWatch Lite 2026.9.18 includes 0.51.0 (protocol 24) and does not connect to 0.52.x: a server used with it stays on 0.51.0 until the app is updated to a release that includes 0.52.1. +- New message codes: `gw.model.no_upstream_rewritten` and `gw.model.not_allowed_rewritten`. + +**Rewriting the model.** A rule that sets the model, for example to send the Claude-style names that Claude Desktop requires to a GLM or DeepSeek upstream, was refused with "No upstream serves model …" whenever the target upstream lists its models. Admission, skipping the candidates that cannot serve a request, and the cheapest group's price comparison all looked at the model the client wrote, before any rule rewrote it. They now look at the model each upstream will actually be asked for, including a rewrite that applies to one upstream only (`provider_would_be`), so admission runs after the rules have decided. When a rewritten model is not served, the error names both models. The routing dry run judges the candidates the same way. + +**Conversations in the Responses and Gemini formats.** Requests from Codex and other clients that use the OpenAI Responses or Gemini format were never assigned to a session, because the fingerprint read only the Anthropic and Chat Completions fields. A load-balancing group with session affinity, which is the default, sent all of them to its first upstream, and the traffic view did not group them into sessions. The fingerprint now also reads `instructions` and `input`, and `systemInstruction` and `contents`, and uses the request's `prompt_cache_key` when it has one. Codex sends one per conversation, and Codex conversations started in the same repository open with identical text.