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

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,44 @@ 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.18] - 2026-09-05
8
+
9
+ Cumulative release of the `0.9.18-alpha.5` through `0.9.18-alpha.7` prereleases. Per-change details remain in the unchanged prerelease sections below.
10
+
11
+ ### Breaking Changes
12
+
13
+ - `createGatewayBindingFetch` requires `binding.fetch()` and forwards requests verbatim. The `gateway(id).run(...)` fallback is removed, `baseUrl` and `gateway` options are ignored, and bindings without `fetch()` fail at construction. Set model base URLs to `https://workers-binding.ai/ai-gateway/gateways/{gateway}/{provider}` ([#8287](https://github.com/earendil-works/pi/pull/8287)).
14
+ - Fast inference is explicit `Model.fastRoute` metadata, not a name suffix. Responses adapters accept the canonical model, send its route's upstream ID, enforce its declared tier even against caller options, and price priority using its base model. A route without a tier sends none. Payload hooks that replace the body with a non-object or change the route's model or tier now fail. Models without routes retain caller-controlled tiers and hooks.
15
+ - GitHub Copilot exposes route-bearing fast models only when OAuth `fastModelIds` advertises the exact ID. Provider-owned names ending in `-fast` remain ordinary models governed by `availableModelIds`.
16
+
17
+ ### Added
18
+
19
+ - Added Claude Fable 5.1 with provider-specific pricing, a 1M-token context window, 128K output, always-on adaptive thinking, and exactly `low`, `medium`, `high`, `xhigh`, and `max` efforts. Added its server-side fallback targets, Claude Opus 4.8 and Opus 5, and compatibility controls for thinking binding, forced tool choice, and temperature.
20
+ - Added Gemini 3.8 Flash across supported provider catalogs, including GitHub Copilot. Google and Vertex use a 1,048,576-token context window and 65,536 output tokens with low, medium, and high thinking; other providers retain their own metadata. Added Copilot Claude Fable 5/5.1 and Baseten `zai-org/GLM-5.3-Fast`.
21
+ - Added GPT-6-Astra on OpenAI, OpenAI Codex, Bedrock, OpenRouter, and Vercel AI Gateway, retaining provider-owned IDs, reasoning levels, pricing, and request-wide long-context tiers. Added a provisional Copilot entry with zero costs for unverified pricing; account availability still depends on Copilot's authenticated catalog.
22
+ - Added OpenRouter `microsoft/mai-image-2.6` and `microsoft/mai-image-2.6-flash` image models.
23
+ - Added public `DocumentContent` PDF input for Anthropic Messages and Bedrock Converse. Unsupported models receive a visible placeholder; non-PDF MIME types are rejected, and token estimates measure the encoded document payload.
24
+ - Added public `FallbackContent`, per-turn Anthropic effort persistence, historical effort markers, signed-thinking recovery, and diagnostics for thinking blocks dropped at request start or after server-side fallback.
25
+ - Added `ModelFastRoute`, `resolveRequestedServiceTier`, and `assertPayloadPreservesFastRoute`, plus `AssistantMessageFrameEncoder` and `reduceAssistantMessageFrames` for compact, replayable stream progress.
26
+ - Added `compat.vllmPriority` for servers using priority scheduling, `supportsMaxOutputTokens` for Responses gateways that reject the output cap, and compatibility flags for unsupported temperature and forced-tool-choice fields.
27
+
28
+ ### Changed
29
+
30
+ - Exported `./utils/*` subpaths for Pi 0.85 runtime packages.
31
+ - Qwen3.8 Max and Flash thinking choices follow models.dev on Qwen Token Plan providers, offering low, medium, and xhigh without off.
32
+ - Responses models supporting `prompt_cache_options`, including Astra, use `ttl: "30m"` for long retention. Earlier models keep the 24-hour legacy field; short and explicit no-cache modes retain capability checks.
33
+ - Assistant-frame reduction reconstructs owned block values rather than deleting fields on externally supplied content, preserving output and field order.
34
+
35
+ ### Fixed
36
+
37
+ - Fixed Claude Fable temperature rejection across Anthropic, Bedrock, OpenRouter, and Copilot, including sampling defaults that reintroduced `temperature`, `top_p`, or `top_k`. Forced tool choices on Fable 5.1 now fail explicitly across supported APIs, including all OpenAI forcing shapes and Bedrock requests without tools; auto and none remain unchanged.
38
+ - Fixed first-party Anthropic model switches and Fable 5.1 prefix changes by preserving eligible signed reasoning and letting the API drop incompatible blocks. Disabled thinking no longer sends the interleaved-thinking beta, and recovery diagnostics survive empty later reports or failed streams.
39
+ - Fixed mid-stream Anthropic fallback attribution, replay, and billing. Handoff markers survive, serving-model prices apply, earlier output-producing attempts are charged once, and pre-handoff reasoning and unexecuted calls/results are dropped together. Faux-provider replay keeps content indices aligned around fallback markers.
40
+ - Fixed Fable 5.1 OAuth requests rejected as `claude_code_version_too_old` by advertising the verified minimum Claude Code version, `2.1.251`.
41
+ - Fixed Copilot Claude Fable routing through Anthropic Messages and all Fireworks GLM models through OpenAI-compatible completions. Removed retired xAI `grok-build-0.1` and restored Qwen3.8 Flash on Qwen Token Plan Individual.
42
+ - Fixed Codex SSE terminal events without a trailing blank line and assistant-frame start snapshots losing `providerThinkingLevel`.
43
+ - Fixed `NO_PROXY` matching for root domains, subdomains, IPv6, port-scoped entries, and wildcard entries.
44
+
7
45
  ## [0.9.18-alpha.7] - 2026-09-05
8
46
 
9
47
  ### Added
@@ -1 +1 @@
1
- {"schemaVersion":3,"generatedAt":"2026-09-06T00:04:10.459Z","structureHash":"b7db7c50426bfacd7587e67c35c5350c110598d755412afa22e54901ca84d01e","files":{"amazon-bedrock.json":"9f4b0e3f033b8092b0ab2e680d71fe957305f2242f84d9b915109b1c3b4d6021","ant-ling.json":"4979fe79d99ed97382d7ce40170c6132e932e77906de1eb54464c042e7d63633","anthropic.json":"555550f3c8957edeb3018e08688b2db1b58191d8a17236c5fdcf53acdce7037a","azure-openai-responses.json":"37d12c5cbfc29bfd9a802a0516f5d3209320bd4aa8ef9cd7c219af208244afa3","baseten.json":"51e518cfa5b2578f1946bcc0defc15814a6391706671a1b2c09a4558582ca99d","cerebras.json":"38272a7525d6680c71bb4bb3c4085e871768b400832e2013b0e7fd92f8fd4f05","cloudflare-ai-gateway.json":"82dc8959837dfbd3bbc1b6d5180d45edf800ee47477f12fb19a7ec32ef2b105c","cloudflare-workers-ai.json":"07ef63208ff7517fd1a80962f18143e21de399640423329490b157f459ccf995","deepseek.json":"8cc5e02a8eb3f1ead25da01d6ebac7dbd9aa5134c561026de2076cc990eb3349","fireworks.json":"bead252c3a5a2f142a8694ee06f63835f05938c01eeafa91bffb5df32f987e5f","github-copilot.json":"dae38668d5d351d28f96181bb01b462b93be1e4b450b859ab7e3da6880f203e6","google-vertex.json":"2cde4c73c7c9bd0ec232f6295a16c1d1780391320e35301b77d710dfdd11cf93","google.json":"54e1dfdd53ea1f9f86a83d3f81b21845eb7e1540c72ecee5255c0e97085d7fc3","groq.json":"e4728fd72e358cd8f25e9a518e9b49a521ef44523d3debe38a7db9e0663c4077","huggingface.json":"3a004b58d3f801077a81f5be5cdf40c59ce1070c9c68f279e8d6c8902d441b19","kimi-coding.json":"5e28e32e5b16df506a3a1c620ed7870fa7e5e57d8ede4a2aa44dbb24ecf1ba2f","minimax-cn.json":"65d37e55a6d9585855f94b3fb7739308d107fe248ebd9e1001d1c5d4606ad2c4","minimax.json":"c7dc5765995ae77242916430929c7cc9a782589f7e483e13f7e01663190d028e","mistral.json":"e3a109306644bf2f2fa38fece50b2d3ce1dbe3b87b1f1b9e2d70cce7eb5c0ea1","moonshotai-cn.json":"1e6146ff3477883636448c0f44222f0a52b3c4562ef8f4eecf7e941cdd59d12e","moonshotai.json":"d8d5209873058ddccd37c1f026833e2ea3f9476c3dc9628b4a940d407acc0b2e","nvidia.json":"7e5d6e027f61e36f8d806d0af311cda93a40e75920b8a0645eddf0ab9f058033","openai-codex.json":"f283674a6e1e9498ca8607f1c14514fd6810fddcdf6b4e8980f7ad7fec174770","openai.json":"775d3b7d95d14b741d0b287b1153d40f051a9ea03035a82b487889acc7fa69e2","opencode-go.json":"bfd19fb58f64ed9e3a129c82eb380151a80602211a43f2f931261d4675a4ed71","opencode.json":"7923dc100adae40eb48ba864c43c21dab8ff69448cdeda0200399dd92fda4f2c","openrouter.json":"dec7d11ba117ffd7cb8fcaedc63608d5441134ef53d5e05ee7f6f85c48cb54e7","qwen-token-plan-cn.json":"d24c5318361ae5395866faaaffde5e52341be58e607def0cc219cae49326492a","qwen-token-plan-individual.json":"eb040e78595853e980011308b1bf9caacae6dc8a91abbac5ffebd402515dd2a6","qwen-token-plan.json":"0545c9881decb710a9535f67960174089b04f607c1200335cdad9de4670ec92a","together.json":"6010980c9b0af72c60965ae325dbdb21e67c91844a7f7f6f7d71d363f1325f56","vercel-ai-gateway.json":"dec9a26efd077b2d9734b2be178c27fbcc8fc8319c2d7bfca2d88496aa533b10","xai.json":"037bde3de5ea72814c3f0b79da8b244c89feb708cc0cbf8596cdfac7682477b6","xiaomi-token-plan-ams.json":"a36446cb9e3cb4f7054617676fd711092245a74f703ba89573f21d2673b85fa8","xiaomi-token-plan-cn.json":"c295dadf4097b5d86af15e924fb2a1a6342bae9e0a9a5839c9fca216308c51e5","xiaomi-token-plan-sgp.json":"93d359575c2348c97d79a2b14e1e9437199bd4aee948d58611b3fbab75cd9fb3","xiaomi.json":"f06f1011d606d22311b1f4c50eb36d38b8cd99abf5760faee657d5559e87452b","zai-coding-cn.json":"d3c969020a7ab978497837a3301c7bca364d704082832221cfe61e6596333e56","zai.json":"f42790c77fb4681a656897a9d860b939916c0ddf979a5f16856bce9573cdf64e"}}
1
+ {"schemaVersion":3,"generatedAt":"2026-09-06T00:41:54.195Z","structureHash":"b7db7c50426bfacd7587e67c35c5350c110598d755412afa22e54901ca84d01e","files":{"amazon-bedrock.json":"9f4b0e3f033b8092b0ab2e680d71fe957305f2242f84d9b915109b1c3b4d6021","ant-ling.json":"4979fe79d99ed97382d7ce40170c6132e932e77906de1eb54464c042e7d63633","anthropic.json":"555550f3c8957edeb3018e08688b2db1b58191d8a17236c5fdcf53acdce7037a","azure-openai-responses.json":"37d12c5cbfc29bfd9a802a0516f5d3209320bd4aa8ef9cd7c219af208244afa3","baseten.json":"51e518cfa5b2578f1946bcc0defc15814a6391706671a1b2c09a4558582ca99d","cerebras.json":"38272a7525d6680c71bb4bb3c4085e871768b400832e2013b0e7fd92f8fd4f05","cloudflare-ai-gateway.json":"82dc8959837dfbd3bbc1b6d5180d45edf800ee47477f12fb19a7ec32ef2b105c","cloudflare-workers-ai.json":"07ef63208ff7517fd1a80962f18143e21de399640423329490b157f459ccf995","deepseek.json":"8cc5e02a8eb3f1ead25da01d6ebac7dbd9aa5134c561026de2076cc990eb3349","fireworks.json":"bead252c3a5a2f142a8694ee06f63835f05938c01eeafa91bffb5df32f987e5f","github-copilot.json":"dae38668d5d351d28f96181bb01b462b93be1e4b450b859ab7e3da6880f203e6","google-vertex.json":"2cde4c73c7c9bd0ec232f6295a16c1d1780391320e35301b77d710dfdd11cf93","google.json":"54e1dfdd53ea1f9f86a83d3f81b21845eb7e1540c72ecee5255c0e97085d7fc3","groq.json":"e4728fd72e358cd8f25e9a518e9b49a521ef44523d3debe38a7db9e0663c4077","huggingface.json":"3a004b58d3f801077a81f5be5cdf40c59ce1070c9c68f279e8d6c8902d441b19","kimi-coding.json":"5e28e32e5b16df506a3a1c620ed7870fa7e5e57d8ede4a2aa44dbb24ecf1ba2f","minimax-cn.json":"65d37e55a6d9585855f94b3fb7739308d107fe248ebd9e1001d1c5d4606ad2c4","minimax.json":"c7dc5765995ae77242916430929c7cc9a782589f7e483e13f7e01663190d028e","mistral.json":"e3a109306644bf2f2fa38fece50b2d3ce1dbe3b87b1f1b9e2d70cce7eb5c0ea1","moonshotai-cn.json":"1e6146ff3477883636448c0f44222f0a52b3c4562ef8f4eecf7e941cdd59d12e","moonshotai.json":"d8d5209873058ddccd37c1f026833e2ea3f9476c3dc9628b4a940d407acc0b2e","nvidia.json":"7e5d6e027f61e36f8d806d0af311cda93a40e75920b8a0645eddf0ab9f058033","openai-codex.json":"f283674a6e1e9498ca8607f1c14514fd6810fddcdf6b4e8980f7ad7fec174770","openai.json":"775d3b7d95d14b741d0b287b1153d40f051a9ea03035a82b487889acc7fa69e2","opencode-go.json":"bfd19fb58f64ed9e3a129c82eb380151a80602211a43f2f931261d4675a4ed71","opencode.json":"7923dc100adae40eb48ba864c43c21dab8ff69448cdeda0200399dd92fda4f2c","openrouter.json":"b7c9ebc0f22d7c2f43bd9d0a1ac9d24aa1ef30fd4f7f7a541e57e2e914c66e94","qwen-token-plan-cn.json":"d24c5318361ae5395866faaaffde5e52341be58e607def0cc219cae49326492a","qwen-token-plan-individual.json":"eb040e78595853e980011308b1bf9caacae6dc8a91abbac5ffebd402515dd2a6","qwen-token-plan.json":"0545c9881decb710a9535f67960174089b04f607c1200335cdad9de4670ec92a","together.json":"6010980c9b0af72c60965ae325dbdb21e67c91844a7f7f6f7d71d363f1325f56","vercel-ai-gateway.json":"dec9a26efd077b2d9734b2be178c27fbcc8fc8319c2d7bfca2d88496aa533b10","xai.json":"037bde3de5ea72814c3f0b79da8b244c89feb708cc0cbf8596cdfac7682477b6","xiaomi-token-plan-ams.json":"a36446cb9e3cb4f7054617676fd711092245a74f703ba89573f21d2673b85fa8","xiaomi-token-plan-cn.json":"c295dadf4097b5d86af15e924fb2a1a6342bae9e0a9a5839c9fca216308c51e5","xiaomi-token-plan-sgp.json":"93d359575c2348c97d79a2b14e1e9437199bd4aee948d58611b3fbab75cd9fb3","xiaomi.json":"f06f1011d606d22311b1f4c50eb36d38b8cd99abf5760faee657d5559e87452b","zai-coding-cn.json":"d3c969020a7ab978497837a3301c7bca364d704082832221cfe61e6596333e56","zai.json":"f42790c77fb4681a656897a9d860b939916c0ddf979a5f16856bce9573cdf64e"}}