@bastani/pi-ai 0.9.75-alpha.1 → 0.9.75

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,31 @@ 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.75] - 2026-11-10
8
+
9
+ Claude Fable 5.2, steadier GitHub Copilot streams and SVG output that works without extra options.
10
+
11
+ - **Claude Fable 5.2.** `claude-fable-5-2` joins the `anthropic` provider with per-message effort and server-side fallback to Claude Opus 5, and Fable and Mythos 5.2 on other providers get the same effort support.
12
+ - **Diagnosable, steadier Copilot streams.** A Copilot stream that ends early reports how long it ran, whether the response had started and the request ID, Anthropic `ping` events keep a silently thinking model inside `streamDeadlineMs`, and a stored API key is filtered by the account's own model list ([#4626](https://github.com/bastani-inc/atomic/issues/4626), [#4627](https://github.com/bastani-inc/atomic/issues/4627)).
13
+ - **SVG images on GPT Image 2.6.** `outputFormat: "svg"` retries with a default authoring model when the API needs one, reports it in `svgModel`, and fails with a typed `invalid-option` error instead of `api-error` ([#4615](https://github.com/bastani-inc/atomic/issues/4615)).
14
+ - **Shared cache warming and correct costs.** Prompt cache warming decisions are shared helpers every host can use, Azure OpenAI keeps its long-context price tier, Anthropic and Bedrock stop resending rejected strict tools, and credential-free catalogs refresh even when a login is stale (upstream [#11857](https://github.com/earendil-works/pi/pull/11857), [#11948](https://github.com/earendil-works/pi/issues/11948), [#11626](https://github.com/earendil-works/pi/issues/11626), [#4610](https://github.com/bastani-inc/atomic/issues/4610)).
15
+
16
+ ### Added
17
+
18
+ - Added the prompt cache warming policy as shared helpers, so every host that warms a prompt cache decides the same way: `getPromptCacheTtlMs()` (the lifetime of the entry a request writes, from the model's `promptCache` tier for the request's `cacheRetention`, then `PI_CACHE_RETENTION`, defaulting to `short`), `getCacheWarmingDelayMs()`, `isCacheWarmingReplayable()`, `getCacheWarmingRequestOptions()`, `evaluateCacheWarming()`, the `CACHE_WARMING_*` constants and the `CacheWarmingAction`, `CacheWarmingPhase` and `CacheWarmingDecision` types. They moved from the coding agent's cache warmer, which keeps resolving the model-specific default retention before it asks for the lifetime (upstream [#11857](https://github.com/earendil-works/pi/pull/11857))
19
+ - Added Claude Fable 5.2 (`claude-fable-5-2`) to the `anthropic` provider ($8/$40 per million input/output tokens, 1M context, 128K output). Like Fable 5.1 it uses per-message effort and mid-conversation system messages; requests its safety classifiers refuse before any output are answered by Claude Opus 5 through server-side fallback and billed at Opus 5's price. Claude Fable 5.2 and Mythos 5.2 on other providers, such as OpenRouter's `anthropic/claude-fable-5.2`, get the same per-message effort support
20
+ - Added `GitHubCopilotStreamAttempt`, which records the request ID, duration and progress of one Copilot streaming request, and its `GitHubCopilotStreamSnapshot` result type, which `classifyGitHubCopilotFailure()` takes as `stream` ([#4626](https://github.com/bastani-inc/atomic/issues/4626))
21
+
22
+ ### Fixed
23
+
24
+ - GitHub Copilot now filters a stored API key by its account's model list as it does an OAuth login. `ApiKeyCredential` gains the optional `availableModelIds` and `fastModelIds` that a model refresh saves from the account's list, `RefreshModelsContext.updateCredential` is offered for a stored API key too and now takes and returns a `Credential` (it writes only while the store still holds the key or token the refresh used), and `refreshGitHubCopilotAccountModelLists()` renews just those lists for a provider alias. Nothing is hidden for a key whose list was not read or names no usable model ([#4627](https://github.com/bastani-inc/atomic/issues/4627))
25
+ - Catalog providers can set `Provider.refreshModelsAuth: "configured"` to refresh without renewing OAuth or receiving a provider credential, while still skipping unconfigured providers. Stale logins no longer block credential-free catalogs ([#4610](https://github.com/bastani-inc/atomic/issues/4610))
26
+ - Azure OpenAI models now keep OpenAI's long-context price tier, so requests above 272K input tokens are costed at Azure's long-context rates instead of the standard rates (upstream [#11948](https://github.com/earendil-works/pi/issues/11948))
27
+ - Fixed Anthropic and Bedrock sending `strict: "prefer"` tools strict again on every request after Claude rejected them for exceeding its strict tool limits, which cost a rejected request (400) per turn. Later requests with the same `sessionId` now send those tools non-strict right away, until `cleanupSessionResources(sessionId)` (upstream [#11626](https://github.com/earendil-works/pi/issues/11626))
28
+ - Fixed `outputFormat: "svg"` on GPT Image 2.6 failing with a generic `api-error` (HTTP 400, `missing_required_parameter` for `svg.model`) on accounts where the API requires the SVG authoring model. A request without `svg` now retries once with a default authoring model, `DEFAULT_SVG_AUTHOR_MODEL` (`gpt-6.1-sol`, a value that worked in testing: OpenAI documents no default), and retries once more without `svg` if the API rejects it as unsupported, so a call sends at most three requests. An `svg` you pass is always sent as given and never retried or replaced. `AssistantImages.svgModel` reports the model that wrote the SVG. A rejected `svg` or `svg.model` now fails with `ImageGenerationConfigError` (`code: "invalid-option"`, `field` `svg.model` or `svg`, and the new `reason` values `required-by-api`, `rejected-by-api` and `unsupported-by-api`) instead of `api-error`. Image requests pass their 10-minute default timeout to the SDK explicitly, so SVG authoring that takes tens of seconds never times out early ([#4615](https://github.com/bastani-inc/atomic/issues/4615))
29
+ - Fixed GitHub Copilot `stream-ended-early` failures giving almost nothing to diagnose them with. `GitHubCopilotStreamEndedEarlyError` now carries `durationMs` (how long the attempt ran) and `startedContent` (whether any stream event had arrived), and takes its `requestId` from the response's `x-request-id`, on Anthropic Messages, Chat Completions and Responses streams. The fields appear in `fields()`, survive serialization, and show in the message (`Attempt ran 312.4 s, response started, request ID …`). The hint no longer says Atomic retries "when retries are enabled", which was wrong once the retries were used up; it now suggests splitting the work, lowering the thinking effort or adding a fallback model. `GitHubCopilotFailureContext.streamStarted` is replaced by `stream`, and `recordGitHubCopilotFailure()` takes a `GitHubCopilotStreamSnapshot` (or `undefined` when no response arrived) instead of a boolean. `GitHubCopilotErrorFieldValue` now includes `boolean` ([#4626](https://github.com/bastani-inc/atomic/issues/4626))
30
+ - Fixed Anthropic `ping` events not counting as activity for the stream idle deadline (`streamDeadlineMs`), so a model thinking silently while the server kept the connection alive was cut at the deadline as if the stream had stalled. `withStreamDeadline()` takes an optional keep-alive predicate: a match restarts the idle timer and is not yielded, so pings never reach `onProviderStreamEvent` ([#4626](https://github.com/bastani-inc/atomic/issues/4626))
31
+
7
32
  ## [0.9.75-alpha.1] - 2026-11-10
8
33
 
9
34
  ### Added
@@ -1 +1 @@
1
- {"schemaVersion":6,"generatedAt":"2026-11-10T02:37:54.807Z","structureHash":"c2266c53a1d653599e676152d47df27bb5eab28b9c15413a8b3fd51fe3324296","files":{"amazon-bedrock.json":"bf527a78cc007883ffddd41caaba68bc4e651780e065a68e2fce2e672923ab47","ant-ling.json":"628feab3ef6c7d80ce96f75999804e1d9f05fec3851e5302e30fff3b69db90f6","anthropic.json":"612f9f1e40f0dd2a2e9c715521df5435e822dbd1bdc8c87b47eaf9c1a9ec8745","azure.json":"3857360054d41814cf9623db124dcb3d784c244c9720a890c39d9fe4731cbae7","baseten.json":"47d10c8050601eb88757def4fc957cdba769dacec4aeb3b0c3f39c41e442330e","cerebras.json":"2eb969b2956844f9a641d3de52c19f1791293c58f607282fb3b0ebfe85ff66f8","cloudflare-ai-gateway.json":"c4671ad861ab6e7e45ec844ea513a2088a390c533dba8e8bd9a54c1a47641861","cloudflare-workers-ai.json":"0dc5eda87ff6de3ee75ee6d547a60162319bb2d51ed09b1e7d47d8ae9ef8548e","deepseek.json":"10a296fb3e898f7715c80890c8af0af4f5fd58f22dbcd6612fdc5d762157ccdc","fireworks.json":"8a5b946e0fbfd1889570591f50a8e38bd01b19fe83135b23dca66138c3ad8f8c","github-copilot.json":"581141741866f4b334bad472229b4ded73999877d58d7748ab95c5dbe7c29118","google-vertex.json":"d8f5698a02ca594f02d9af5a8be1a45881201d097821873305ae79dc4211f147","google.json":"ec3af1b4143643faf77e90a0b9b1029889599bc259a91cd3679c7e58c59a3ff2","groq.json":"087df37206e9eed8b10f1e558e4c496289bef60074b7e8afba4f20fb102b4ec2","huggingface.json":"209cdcf205961ef2ff203486da614232a86a069ebe0e98266189a14a235fac8f","kimi-coding.json":"e6d5bce9045cf533ca9e0d563a7d30a6a1ed48c89a0f539ed4c9d3ac53d4ac8b","meta.json":"6ccc391fc86586638b4a2f26420f0e4763fccce04d746665cbd55f477124bb3b","minimax-cn.json":"fa15d1f67a07046d38e191af9bd97ed922ba45a99a11af4ad281151cc6b762aa","minimax.json":"1e0459dda3858ea24151182106fc4179b95f43a0a8dffc1c3d2e7db4c2d9206e","mistral.json":"7e67f69ac2b609fca9f7b721243fb70fa6f4feade3cb20eedcd5786f9eac64f1","moonshotai-cn.json":"1a15468b1edf9205956e4c5ea41fc4cacc14eabf00523b9143e23a38264f57f7","moonshotai.json":"f31cdf2e6c81a403c4cb0e6b7e759ceff2820f966b08dbec80cfafa3f80dfc63","nvidia.json":"078fae404fc622ca6461f16a74791fedafe44976a6c3323b6ba779729823d4ff","openai-codex.json":"79856e655a4cdf5ad32f178dd001cbfda5d13e68006ad8aade0bc3636f5faabb","openai-decisions.json":"0c7d54fcbac5e7388872a85c0db7f336c5a57c82d403266e9ae04f87561daf4f","openai-images.json":"95e906730507ae8adcd49afa81fc21f7cee13c12842a71ba04ab62c59637bdb6","openai.json":"c51bffed14b4bdfb15fbffef068a9c07e973d36dd7490397d5bb7d00483752b3","opencode-go.json":"ffc3d1114466e54b14e5b5a81dbcb1092af112658d829ac37c05f1a844e8b82c","opencode.json":"cc1065af01104e5ca7f7240b65fb6ca2cbee21dde8716d41199d8d936731d705","openrouter.json":"17f8eb75a15a0abbce08a1ec8a48492aeb523bca41144980f983f23bea1f6251","qwen-token-plan-cn.json":"64427a6adeb3e7dd1857d68bef9bb12097632b646ed151b740e209143e31341e","qwen-token-plan-individual-cn.json":"4d5af1f18c8c2306b2158bda5052a9b347cce4dfa7e97245700f1c84798d1cfb","qwen-token-plan-individual.json":"3c3825ba2d19642b691b4c51c79bc93fcf501d39e9f0566d05a0f135aab8a6f6","qwen-token-plan.json":"37b9a76c54090228d1026a8f0fcb4d304b00d64b1a3a94cb2ae6e677d2c52b13","radius.json":"b757791113c3ac1c7b43501d7b4de2ae51b7dad443e34c78650632de395bf925","together.json":"cd63c051ea61bdb210c6e826e5fc892e4c1f9c9c0ab6eb91933a0620701d17e1","typesafe.json":"938c89dfb6f636dce1483ec6acc739af4b881f61003d007807a74414eb2bf357","vercel-ai-gateway.json":"56941a141502ebbf84137609a0cb0079604fe15bd5d4a5cd755b068893bc5b8a","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-11-10T03:14:51.823Z","structureHash":"c2266c53a1d653599e676152d47df27bb5eab28b9c15413a8b3fd51fe3324296","files":{"amazon-bedrock.json":"bf527a78cc007883ffddd41caaba68bc4e651780e065a68e2fce2e672923ab47","ant-ling.json":"628feab3ef6c7d80ce96f75999804e1d9f05fec3851e5302e30fff3b69db90f6","anthropic.json":"612f9f1e40f0dd2a2e9c715521df5435e822dbd1bdc8c87b47eaf9c1a9ec8745","azure.json":"3857360054d41814cf9623db124dcb3d784c244c9720a890c39d9fe4731cbae7","baseten.json":"47d10c8050601eb88757def4fc957cdba769dacec4aeb3b0c3f39c41e442330e","cerebras.json":"2eb969b2956844f9a641d3de52c19f1791293c58f607282fb3b0ebfe85ff66f8","cloudflare-ai-gateway.json":"c4671ad861ab6e7e45ec844ea513a2088a390c533dba8e8bd9a54c1a47641861","cloudflare-workers-ai.json":"0dc5eda87ff6de3ee75ee6d547a60162319bb2d51ed09b1e7d47d8ae9ef8548e","deepseek.json":"10a296fb3e898f7715c80890c8af0af4f5fd58f22dbcd6612fdc5d762157ccdc","fireworks.json":"8a5b946e0fbfd1889570591f50a8e38bd01b19fe83135b23dca66138c3ad8f8c","github-copilot.json":"581141741866f4b334bad472229b4ded73999877d58d7748ab95c5dbe7c29118","google-vertex.json":"d8f5698a02ca594f02d9af5a8be1a45881201d097821873305ae79dc4211f147","google.json":"ec3af1b4143643faf77e90a0b9b1029889599bc259a91cd3679c7e58c59a3ff2","groq.json":"087df37206e9eed8b10f1e558e4c496289bef60074b7e8afba4f20fb102b4ec2","huggingface.json":"209cdcf205961ef2ff203486da614232a86a069ebe0e98266189a14a235fac8f","kimi-coding.json":"e6d5bce9045cf533ca9e0d563a7d30a6a1ed48c89a0f539ed4c9d3ac53d4ac8b","meta.json":"6ccc391fc86586638b4a2f26420f0e4763fccce04d746665cbd55f477124bb3b","minimax-cn.json":"fa15d1f67a07046d38e191af9bd97ed922ba45a99a11af4ad281151cc6b762aa","minimax.json":"1e0459dda3858ea24151182106fc4179b95f43a0a8dffc1c3d2e7db4c2d9206e","mistral.json":"7e67f69ac2b609fca9f7b721243fb70fa6f4feade3cb20eedcd5786f9eac64f1","moonshotai-cn.json":"1a15468b1edf9205956e4c5ea41fc4cacc14eabf00523b9143e23a38264f57f7","moonshotai.json":"f31cdf2e6c81a403c4cb0e6b7e759ceff2820f966b08dbec80cfafa3f80dfc63","nvidia.json":"078fae404fc622ca6461f16a74791fedafe44976a6c3323b6ba779729823d4ff","openai-codex.json":"79856e655a4cdf5ad32f178dd001cbfda5d13e68006ad8aade0bc3636f5faabb","openai-decisions.json":"0c7d54fcbac5e7388872a85c0db7f336c5a57c82d403266e9ae04f87561daf4f","openai-images.json":"95e906730507ae8adcd49afa81fc21f7cee13c12842a71ba04ab62c59637bdb6","openai.json":"c51bffed14b4bdfb15fbffef068a9c07e973d36dd7490397d5bb7d00483752b3","opencode-go.json":"ffc3d1114466e54b14e5b5a81dbcb1092af112658d829ac37c05f1a844e8b82c","opencode.json":"cc1065af01104e5ca7f7240b65fb6ca2cbee21dde8716d41199d8d936731d705","openrouter.json":"7644874cbcf0fb2fcd1304dab64b1925e78fdf08c5cd30fa1f293ca009255855","qwen-token-plan-cn.json":"64427a6adeb3e7dd1857d68bef9bb12097632b646ed151b740e209143e31341e","qwen-token-plan-individual-cn.json":"4d5af1f18c8c2306b2158bda5052a9b347cce4dfa7e97245700f1c84798d1cfb","qwen-token-plan-individual.json":"3c3825ba2d19642b691b4c51c79bc93fcf501d39e9f0566d05a0f135aab8a6f6","qwen-token-plan.json":"37b9a76c54090228d1026a8f0fcb4d304b00d64b1a3a94cb2ae6e677d2c52b13","radius.json":"b757791113c3ac1c7b43501d7b4de2ae51b7dad443e34c78650632de395bf925","together.json":"cd63c051ea61bdb210c6e826e5fc892e4c1f9c9c0ab6eb91933a0620701d17e1","typesafe.json":"938c89dfb6f636dce1483ec6acc739af4b881f61003d007807a74414eb2bf357","vercel-ai-gateway.json":"56941a141502ebbf84137609a0cb0079604fe15bd5d4a5cd755b068893bc5b8a","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"}}