diff --git a/Cargo.lock b/Cargo.lock index cbe4a1b3..bb59dcc3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3670,7 +3670,7 @@ dependencies = [ [[package]] name = "tw-api" -version = "0.80.0" +version = "0.81.0" dependencies = [ "serde", "serde_json", @@ -3681,7 +3681,7 @@ dependencies = [ [[package]] name = "tw-bedrock" -version = "0.80.0" +version = "0.81.0" dependencies = [ "aws-credential-types", "aws-sigv4", @@ -3702,7 +3702,7 @@ dependencies = [ [[package]] name = "tw-breaker" -version = "0.80.0" +version = "0.81.0" dependencies = [ "serde", "serde_json", @@ -3710,7 +3710,7 @@ dependencies = [ [[package]] name = "tw-config" -version = "0.80.0" +version = "0.81.0" dependencies = [ "blake3", "libc", @@ -3736,7 +3736,7 @@ dependencies = [ [[package]] name = "tw-control" -version = "0.80.0" +version = "0.81.0" dependencies = [ "axum", "base64 0.22.1", @@ -3781,7 +3781,7 @@ dependencies = [ [[package]] name = "tw-dialect" -version = "0.80.0" +version = "0.81.0" dependencies = [ "memchr", "serde", @@ -3790,7 +3790,7 @@ dependencies = [ [[package]] name = "tw-engine" -version = "0.80.0" +version = "0.81.0" dependencies = [ "chrono", "serde", @@ -3804,7 +3804,7 @@ dependencies = [ [[package]] name = "tw-gateway" -version = "0.80.0" +version = "0.81.0" dependencies = [ "arc-swap", "async-stream", @@ -3855,7 +3855,7 @@ dependencies = [ [[package]] name = "tw-guard" -version = "0.80.0" +version = "0.81.0" dependencies = [ "aho-corasick", "base64 0.22.1", @@ -3873,7 +3873,7 @@ dependencies = [ [[package]] name = "tw-link" -version = "0.80.0" +version = "0.81.0" dependencies = [ "serde", "serde_json", @@ -3887,7 +3887,7 @@ dependencies = [ [[package]] name = "tw-observe" -version = "0.80.0" +version = "0.81.0" dependencies = [ "tokio", "tracing", @@ -3896,7 +3896,7 @@ dependencies = [ [[package]] name = "tw-pack" -version = "0.80.0" +version = "0.81.0" dependencies = [ "age", "blake3", @@ -3920,7 +3920,7 @@ dependencies = [ [[package]] name = "tw-plugin" -version = "0.80.0" +version = "0.81.0" dependencies = [ "libc", "rand 0.10.2", @@ -3936,7 +3936,7 @@ dependencies = [ [[package]] name = "tw-pricing" -version = "0.80.0" +version = "0.81.0" dependencies = [ "arc-swap", "flate2", @@ -3949,14 +3949,14 @@ dependencies = [ [[package]] name = "tw-secret" -version = "0.80.0" +version = "0.81.0" dependencies = [ "thiserror 2.0.20", ] [[package]] name = "tw-store" -version = "0.80.0" +version = "0.81.0" dependencies = [ "blake3", "bytes", @@ -3976,7 +3976,7 @@ dependencies = [ [[package]] name = "tw-sync" -version = "0.80.0" +version = "0.81.0" dependencies = [ "age", "axum", @@ -4004,7 +4004,7 @@ dependencies = [ [[package]] name = "tw-types" -version = "0.80.0" +version = "0.81.0" dependencies = [ "serde", "serde_json", @@ -4013,7 +4013,7 @@ dependencies = [ [[package]] name = "tw-watch" -version = "0.80.0" +version = "0.81.0" dependencies = [ "libc", "notify", @@ -4024,7 +4024,7 @@ dependencies = [ [[package]] name = "tw-yaml" -version = "0.80.0" +version = "0.81.0" dependencies = [ "saphyr-parser", "serde_yaml_ng", @@ -4034,7 +4034,7 @@ dependencies = [ [[package]] name = "twcore" -version = "0.80.0" +version = "0.81.0" dependencies = [ "anyhow", "axum", diff --git a/Cargo.toml b/Cargo.toml index 6ad24d9f..563c06af 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -59,7 +59,7 @@ categories = ["network-programming", "web-programming::http-server"] # 二进制走 CalVer,crate 走 SemVer —— 两者是两回事,卖给不同的人。 # 这里是 crate 的版本。 -version = "0.80.0" +version = "0.81.0" [workspace.dependencies] # ── 内部 crate ─────────────────────────────────────────── diff --git a/release-notes/0.81.0.md b/release-notes/0.81.0.md new file mode 100644 index 00000000..d3886f3f --- /dev/null +++ b/release-notes/0.81.0.md @@ -0,0 +1,14 @@ +This release keeps a conversation that carries encrypted history on the upstream that encrypted it, so moving a route to another upstream no longer breaks a Codex conversation that is under way. + +**Upgrade notes** + +- The control-plane protocol version stays at 51, and the request store's schema is unchanged; nothing is cleared. +- No configuration key is added, renamed or removed. + +**Conversations with encrypted history stay on their upstream.** OpenAI Responses hands clients encrypted state to send back each turn (`encrypted_content`: reasoning, compacted history, and the messages Codex sub-agents report to each other), and only the account that encrypted it can read it. Before, a conversation moved to another upstream, for example after its route was changed, failed every turn with `invalid_encrypted_content`. + +- The gateway now remembers which upstream last answered each conversation, across configuration reloads, a cold cache and quiet upstreams. A conversation that carried encrypted content is remembered for 30 days; the record does not survive a restart of core. +- When more than reasoning is encrypted, the conversation goes back to that upstream only, whatever its rule now picks, with no failover. If that upstream was removed, the request is refused with `gw.route.sealed_upstream_gone`. +- When only reasoning is encrypted, that upstream is tried first and the others remain as fallbacks. +- The route decision records this as the new reason `sealed`. +- An upstream that refuses encrypted content it cannot read (with a 400, or with an error inside the stream) now fails the request with `gw.upstream.sealed_elsewhere`, which names the upstream and explains that the history was encrypted by another one.