@bastani/pi-ai 0.9.44-alpha.7 → 0.9.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,29 @@ This package is a Bastani fork of `@earendil-works/pi-ai`. Upstream history at t
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.9.44] - 2026-10-25
8
+
9
+ ### Breaking Changes
10
+
11
+ - `appendGrammarToolInputJsonDelta()` (`api/constrained-sampling`) takes the input delta instead of the whole input so far and no longer closes the input; close it with the new `closeGrammarToolInputJson()` ([pi #9265](https://github.com/earendil-works/pi/issues/9265))
12
+
13
+ ### Added
14
+
15
+ - Assistant messages from the `pi-messages` API now carry `responseModel`, the concrete model the server reports on its terminal `done` or `error` event, so clients of virtual models can see which model answered ([pi #11265](https://github.com/earendil-works/pi/pull/11265))
16
+ - Added `StreamingJsonParser`, an incremental, tolerant parser for JSON text that arrives in pieces (each piece is read once; snapshots of the partial value never change once returned), and `ToolCallArgumentsStream`, which every provider now uses for streamed tool-call arguments; `StreamingJsonParser.append()` also returns the changes each piece made (`JsonChange`), for writers that keep their own copy ([pi #9265](https://github.com/earendil-works/pi/issues/9265))
17
+
18
+ ### Changed
19
+
20
+ - The faux provider streams partial tool-call arguments, so `toolcall_delta` partials show growing arguments as real providers do ([pi #9265](https://github.com/earendil-works/pi/issues/9265))
21
+
22
+ ### Fixed
23
+
24
+ - Claude models with mid-conversation effort no longer fail with `Invalid effort level` on accounts whose organization caps effort below `high`, even at `low` or `medium` thinking: the fixed top-level effort is now `low`, and the per-message effort markers still set the level for each reply ([pi #10063](https://github.com/earendil-works/pi/issues/10063))
25
+ - The faux provider no longer counts newly cached prompt tokens both as `input` and as `cacheWrite` when it simulates prompt caching for a `sessionId`. Every prompt token now goes to either `cacheRead` or `cacheWrite`, and `input` is 0 ([pi f3fa8bd9](https://github.com/earendil-works/pi/commit/f3fa8bd92430a2bf443681027a01c58586f35464))
26
+ - Gemini tool schemas sent through `parametersJsonSchema` now express string and number `const` values as single-value `enum`s, which Gemini honors (it ignores `const`). Only schema-bearing keywords are rewritten, so literal data under `default`, `examples`, `enum`, `const` and custom keywords, and property names such as `__proto__`, are sent unchanged ([pi 7314819f](https://github.com/earendil-works/pi/commit/7314819f0fe30fa616f32fa3a1fc8d1a856a1446), [pi #11308](https://github.com/earendil-works/pi/issues/11308))
27
+ - Kimi K3.1 Pro and K3.1 Pro Highspeed on Kimi Coding, Moonshot, and OpenCode Go no longer use Kimi K2 request settings. They now send `reasoning_effort` (low/high/max), return earlier reasoning, accept tools added mid-conversation, and report Moonshot rates on Kimi Coding; OpenRouter and Vercel AI Gateway clamp their output limit like Kimi K3. Kimi Coding `k3-256k` now reports Kimi K3 rates ([pi 1de2d7ad](https://github.com/earendil-works/pi/commit/1de2d7adeacfd1b065d9df091997d44c43120ade))
28
+ - Streamed tool-call arguments are no longer re-parsed in full on every delta, which made CPU time and memory grow quadratically with the size of a tool call (a 90 KB `write` on Anthropic peaked at about 140 MB of heap; a 500 KB one took minutes). Every provider and the pi-messages client now read each delta once, and keep their stream state (`partialJson`, `partialArgs`, `index`, `customInput`, `streamIndex`, Bedrock's encrypted reasoning bytes) off the content blocks, so it no longer reaches partial messages or transcripts of failed streams. Grammar (custom) tool input streaming no longer copies the whole input on every delta, and truncated provider error bodies and pi-messages diagnostics no longer keep the whole text they were cut from alive ([pi #9265](https://github.com/earendil-works/pi/issues/9265))
29
+
7
30
  ## [0.9.44-alpha.1] - 2026-10-24
8
31
 
9
32
  ### Breaking Changes
@@ -1 +1 @@
1
- {"schemaVersion":6,"generatedAt":"2026-10-25T15:58:44.749Z","structureHash":"2e1d9c1a86d43e022462ccfc0a4e0a637f7fe5de20f1a24d0eb40be6f6cba505","files":{"amazon-bedrock.json":"6f3903019d55d747246493bb76b53ad9557ba694b8a53327460b654712baff3a","ant-ling.json":"628feab3ef6c7d80ce96f75999804e1d9f05fec3851e5302e30fff3b69db90f6","anthropic.json":"f797095e492df25157b14e399ff8030b4d0a75e698f415534cc79f606cf99ffb","azure.json":"b5cadb3c4b0a93c8558cf99927e0f00deee5ba0a1b4c8329dc12dc3be99b2b94","baseten.json":"5bd3c98c61769388b3724368ef964d16b7a58e41a6edcf4ebceb9d4ac0a21d3b","cerebras.json":"2eb969b2956844f9a641d3de52c19f1791293c58f607282fb3b0ebfe85ff66f8","cloudflare-ai-gateway.json":"0e06e0b4ad5710a1f4ae3076bea136f0a3bd47e2be35ead8ae714b65d22a936a","cloudflare-workers-ai.json":"36c80c7d7606465001706d5b5d8612d825d8c501d20efb994599960693d37d43","deepseek.json":"10a296fb3e898f7715c80890c8af0af4f5fd58f22dbcd6612fdc5d762157ccdc","fireworks.json":"dae512231a827203db11907889cf235fda8ea4ee10447d6376d83ed712b372a2","github-copilot.json":"0073eada8bccd1af1898af5d723de80c1aca056df2e79724bc74165de46ee737","google-vertex.json":"564d692a4292ef12e98c8ec056a39948ea64e10851f5ddaaebcc37b585545231","google.json":"b61fb0e27da5be60e1112e46955c5923656cb4d62bb221f834a9463d764ef5de","groq.json":"087df37206e9eed8b10f1e558e4c496289bef60074b7e8afba4f20fb102b4ec2","huggingface.json":"2c78f762f4aa8d0e351f53d4c3fa971557175f315f1c6e3c63ddb45dd764151b","kimi-coding.json":"e6d5bce9045cf533ca9e0d563a7d30a6a1ed48c89a0f539ed4c9d3ac53d4ac8b","meta.json":"563f5ec07973f52ab8c3eb26ef91a36ad8a79e950b37174935666cdcb624bf35","minimax-cn.json":"fa15d1f67a07046d38e191af9bd97ed922ba45a99a11af4ad281151cc6b762aa","minimax.json":"1e0459dda3858ea24151182106fc4179b95f43a0a8dffc1c3d2e7db4c2d9206e","mistral.json":"09ff08882f868976c6e6c84072ccb82cc7b19e1044799e5da451626c963d6396","moonshotai-cn.json":"1a15468b1edf9205956e4c5ea41fc4cacc14eabf00523b9143e23a38264f57f7","moonshotai.json":"f31cdf2e6c81a403c4cb0e6b7e759ceff2820f966b08dbec80cfafa3f80dfc63","nvidia.json":"6f66192c21788b4555f7e77bd7c14201172edf355be8d318f96ff8d0d6921054","openai-codex.json":"d20e2c769968eb4070df70a73cc093aebd741fb734532cbb5b0a8b61b36b61de","openai-decisions.json":"0c7d54fcbac5e7388872a85c0db7f336c5a57c82d403266e9ae04f87561daf4f","openai-images.json":"885b1c5ec4198ebe2b73518e61cbf989a7cad9229d01813635f361b29a909562","openai.json":"6b8461776f8367d160fff29253c0326f74af1fc41258c77e6bf7151a33d20e35","opencode-go.json":"b0448f242ef9a2392b44064b21a07f5e16b661333dac09b28b8bc52dd75fd66e","opencode.json":"585043964ef561b731d35beefe64e5b5073aa1e92d641d52c5793c53cab46264","openrouter.json":"6649b8633929fc82e35288be7fb6757fe42a4fc4c48416e46e771c8d64a5e54f","qwen-token-plan-cn.json":"64427a6adeb3e7dd1857d68bef9bb12097632b646ed151b740e209143e31341e","qwen-token-plan-individual.json":"0fb7cf64faf39d1a3b0a884210a86c87084b805eda15644f5f39293287b959dd","qwen-token-plan.json":"37b9a76c54090228d1026a8f0fcb4d304b00d64b1a3a94cb2ae6e677d2c52b13","radius.json":"c1f94d967d3adf99aa3072b869c4c9b836886824f992efeca5889f99c06b0f5f","together.json":"2a28fa1978c996ac0a7f0fc07f0c98a37dbf282afe77c0f141dab0c36791ef83","typesafe.json":"938c89dfb6f636dce1483ec6acc739af4b881f61003d007807a74414eb2bf357","vercel-ai-gateway.json":"f2f214579b7500bdf6751edf113c85985f5d7ca6a16de4e5f1d81662e68813c8","xai.json":"59f8a7bdf14e79ba1b0d0a37e56251bbf100420bdac7d6af5942508fdb990f11","xiaomi-token-plan-ams.json":"bfd33741da693bdb8e8ebd4e7b90c3e90820aa18432ad081a5a98db13c6bd296","xiaomi-token-plan-cn.json":"4b61d78feae3a926fda918c3fd3a9afaf2ca60c1bba0af8270a5398fb50a983e","xiaomi-token-plan-sgp.json":"b05a197ce24fd69fc9440f4ba929984ac7a0fefbe8083268734b422e721987ec","xiaomi.json":"495b5fddf3c3ec8904fecc15c4c19536f4961dce7b51512b6909d2df2e739824","zai-coding-cn.json":"cc9e0768e726ef55d2b7af853ac5f3585dc72575932cb38840a3877d18736b78","zai.json":"58e6642fdfb736f0b9a4a277c760c536a3cea66a030abbfb2615f7b2851d5c6f"}}
1
+ {"schemaVersion":6,"generatedAt":"2026-10-25T17:08:13.858Z","structureHash":"2e1d9c1a86d43e022462ccfc0a4e0a637f7fe5de20f1a24d0eb40be6f6cba505","files":{"amazon-bedrock.json":"6f3903019d55d747246493bb76b53ad9557ba694b8a53327460b654712baff3a","ant-ling.json":"628feab3ef6c7d80ce96f75999804e1d9f05fec3851e5302e30fff3b69db90f6","anthropic.json":"f797095e492df25157b14e399ff8030b4d0a75e698f415534cc79f606cf99ffb","azure.json":"b5cadb3c4b0a93c8558cf99927e0f00deee5ba0a1b4c8329dc12dc3be99b2b94","baseten.json":"5bd3c98c61769388b3724368ef964d16b7a58e41a6edcf4ebceb9d4ac0a21d3b","cerebras.json":"2eb969b2956844f9a641d3de52c19f1791293c58f607282fb3b0ebfe85ff66f8","cloudflare-ai-gateway.json":"0e06e0b4ad5710a1f4ae3076bea136f0a3bd47e2be35ead8ae714b65d22a936a","cloudflare-workers-ai.json":"36c80c7d7606465001706d5b5d8612d825d8c501d20efb994599960693d37d43","deepseek.json":"10a296fb3e898f7715c80890c8af0af4f5fd58f22dbcd6612fdc5d762157ccdc","fireworks.json":"dae512231a827203db11907889cf235fda8ea4ee10447d6376d83ed712b372a2","github-copilot.json":"0073eada8bccd1af1898af5d723de80c1aca056df2e79724bc74165de46ee737","google-vertex.json":"564d692a4292ef12e98c8ec056a39948ea64e10851f5ddaaebcc37b585545231","google.json":"b61fb0e27da5be60e1112e46955c5923656cb4d62bb221f834a9463d764ef5de","groq.json":"087df37206e9eed8b10f1e558e4c496289bef60074b7e8afba4f20fb102b4ec2","huggingface.json":"2c78f762f4aa8d0e351f53d4c3fa971557175f315f1c6e3c63ddb45dd764151b","kimi-coding.json":"e6d5bce9045cf533ca9e0d563a7d30a6a1ed48c89a0f539ed4c9d3ac53d4ac8b","meta.json":"563f5ec07973f52ab8c3eb26ef91a36ad8a79e950b37174935666cdcb624bf35","minimax-cn.json":"fa15d1f67a07046d38e191af9bd97ed922ba45a99a11af4ad281151cc6b762aa","minimax.json":"1e0459dda3858ea24151182106fc4179b95f43a0a8dffc1c3d2e7db4c2d9206e","mistral.json":"09ff08882f868976c6e6c84072ccb82cc7b19e1044799e5da451626c963d6396","moonshotai-cn.json":"1a15468b1edf9205956e4c5ea41fc4cacc14eabf00523b9143e23a38264f57f7","moonshotai.json":"f31cdf2e6c81a403c4cb0e6b7e759ceff2820f966b08dbec80cfafa3f80dfc63","nvidia.json":"6f66192c21788b4555f7e77bd7c14201172edf355be8d318f96ff8d0d6921054","openai-codex.json":"d20e2c769968eb4070df70a73cc093aebd741fb734532cbb5b0a8b61b36b61de","openai-decisions.json":"0c7d54fcbac5e7388872a85c0db7f336c5a57c82d403266e9ae04f87561daf4f","openai-images.json":"885b1c5ec4198ebe2b73518e61cbf989a7cad9229d01813635f361b29a909562","openai.json":"6b8461776f8367d160fff29253c0326f74af1fc41258c77e6bf7151a33d20e35","opencode-go.json":"b0448f242ef9a2392b44064b21a07f5e16b661333dac09b28b8bc52dd75fd66e","opencode.json":"585043964ef561b731d35beefe64e5b5073aa1e92d641d52c5793c53cab46264","openrouter.json":"1a38c1a167cc7f08c85f43a6d5ce51f0507e2a3fac9d6788873c98333660f352","qwen-token-plan-cn.json":"64427a6adeb3e7dd1857d68bef9bb12097632b646ed151b740e209143e31341e","qwen-token-plan-individual.json":"0fb7cf64faf39d1a3b0a884210a86c87084b805eda15644f5f39293287b959dd","qwen-token-plan.json":"37b9a76c54090228d1026a8f0fcb4d304b00d64b1a3a94cb2ae6e677d2c52b13","radius.json":"c1f94d967d3adf99aa3072b869c4c9b836886824f992efeca5889f99c06b0f5f","together.json":"2a28fa1978c996ac0a7f0fc07f0c98a37dbf282afe77c0f141dab0c36791ef83","typesafe.json":"938c89dfb6f636dce1483ec6acc739af4b881f61003d007807a74414eb2bf357","vercel-ai-gateway.json":"f2f214579b7500bdf6751edf113c85985f5d7ca6a16de4e5f1d81662e68813c8","xai.json":"59f8a7bdf14e79ba1b0d0a37e56251bbf100420bdac7d6af5942508fdb990f11","xiaomi-token-plan-ams.json":"bfd33741da693bdb8e8ebd4e7b90c3e90820aa18432ad081a5a98db13c6bd296","xiaomi-token-plan-cn.json":"4b61d78feae3a926fda918c3fd3a9afaf2ca60c1bba0af8270a5398fb50a983e","xiaomi-token-plan-sgp.json":"b05a197ce24fd69fc9440f4ba929984ac7a0fefbe8083268734b422e721987ec","xiaomi.json":"495b5fddf3c3ec8904fecc15c4c19536f4961dce7b51512b6909d2df2e739824","zai-coding-cn.json":"cc9e0768e726ef55d2b7af853ac5f3585dc72575932cb38840a3877d18736b78","zai.json":"58e6642fdfb736f0b9a4a277c760c536a3cea66a030abbfb2615f7b2851d5c6f"}}