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

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
@@ -6,10 +6,16 @@ This package is a Bastani fork of `@earendil-works/pi-ai`. Upstream history at t
6
6
 
7
7
  ## [0.9.71] - 2026-11-03
8
8
 
9
+ Copilot discovery now preserves readable model names alongside exact request IDs.
10
+
11
+ - **Account model discovery.** OAuth and API-key users get the chat models their account offers, with advertised names and exact IDs, without replacing curated catalog metadata ([#4279](https://github.com/bastani-inc/atomic/pull/4279), [#4303](https://github.com/bastani-inc/atomic/pull/4303)).
12
+ - **Anthropic conversation reuse.** Message threads send only new messages when the server can continue a session, with full-request fallback when its context changes ([#4293](https://github.com/bastani-inc/atomic/pull/4293)).
13
+ - **Tool compatibility.** Plain JSON Schema tools gain coercion and validation through pi-schema while TypeBox tools keep their existing checks ([#4300](https://github.com/bastani-inc/atomic/pull/4300), [#4301](https://github.com/bastani-inc/atomic/pull/4301)).
14
+
9
15
  ### Added
10
16
 
11
17
  - Added the text-only `github-copilot/microsoft-decision-1` classifier with OAuth and API-key support (upstream [#11679](https://github.com/earendil-works/pi/pull/11679)).
12
- - `github-copilot` discovers models from the account's `/models` list. `discoverGitHubCopilotModels(catalog, context)` reads the list with the effective OAuth or API-key credential and returns the chat models the catalog lacks, each under its exact advertised ID as both ID and name and marked `discovered: true`; `parseGitHubCopilotDiscoveredModels(response, catalog)` applies the same rules to a response. It returns `undefined`, not an empty list, when the list cannot be read (no usable credential, or a 400, 401, 403 or 404 response), so a caller keeps the models it found before. Entries with a disabled policy, hidden from the model picker, without tool-call support, or already in the catalog are skipped, so curated entries keep their metadata. Every entry, fast entries included, takes its API, limits, image input and reasoning efforts from its own row, and a Messages entry that advertises adaptive thinking gets `compat.forceAdaptiveThinking`, so the selected effort is sent. A fast entry carries fast route metadata only when its `family` names another model.
18
+ - `github-copilot` discovers models from the account's `/models` list. `discoverGitHubCopilotModels(catalog, context)` reads the list with the effective OAuth or API-key credential and returns the chat models the catalog lacks, each under its exact advertised ID, with its advertised display name or the ID when no name is provided, and marked `discovered: true`; `parseGitHubCopilotDiscoveredModels(response, catalog)` applies the same rules to a response. It returns `undefined`, not an empty list, when the list cannot be read (no usable credential, or a 400, 401, 403 or 404 response), so a caller keeps the models it found before. Entries with a disabled policy, hidden from the model picker, without tool-call support, or already in the catalog are skipped, so curated entries keep their metadata. Every entry, fast entries included, takes its API, limits, image input and reasoning efforts from its own row, and a Messages entry that advertises adaptive thinking gets `compat.forceAdaptiveThinking`, so the selected effort is sent. A fast entry carries fast route metadata only when its `family` names another model.
13
19
  - `Model.discovered` marks a model found in the account's own model list rather than in the built-in catalog.
14
20
  - `RefreshModelsContext.updateCredential` lets a provider's network refresh save account data it read, such as the model lists an availability filter checks, to the OAuth login the refresh used. Nothing is written once the store holds a different token, so a renewed login or another account is never changed.
15
21
  - Anthropic requests with a `sessionId` (and `cacheRetention` not `"none"`) now use message threads (`message-threads-2026-08-12` beta): the server continues from the previous reply and only the new messages are sent instead of the whole conversation. When anything earlier in the request changed, or the server can't continue the thread, the full request is sent. Token counts and prompt caching are unchanged. On by default only for the `anthropic` provider on `api.anthropic.com`; set `compat.supportsMessageThreads` to change that, for example for gateways that forward the `thread` field. Fast-mode requests keep their `speed`, and changing it starts a new thread; requests made with a caller-supplied `client` never use threads. `cleanupSessionResources(sessionId)` frees a session's thread state (upstream [earendil-works/pi#11545](https://github.com/earendil-works/pi/pull/11545))
@@ -23,6 +29,7 @@ This package is a Bastani fork of `@earendil-works/pi-ai`. Upstream history at t
23
29
 
24
30
  ### Fixed
25
31
 
32
+ - `github-copilot` models discovered from the account's `/models` list are named by the display name their list entry advertises (for example `Claude Sonnet 4.5`) instead of repeating their ID, and fall back to the ID when the entry has no name. IDs are unchanged, so requests still use the exact advertised ID ([#4303](https://github.com/bastani-inc/atomic/pull/4303)).
26
33
  - A plain JSON Schema tool whose schema has a `$ref` that names nothing (a missing definition, an external document), as some MCP servers send, now rejects only arguments at that place (`- extra: unresolved reference #/definitions/Missing`) instead of failing every call of the tool (upstream [`6536f801`](https://github.com/earendil-works/pi/commit/6536f80129a266c3619c044f8487c0279fc39cd9))
27
34
  - OpenAI Codex SSE retries no longer leave an `abort` listener on the caller's signal after each completed backoff (upstream [#11708](https://github.com/earendil-works/pi/issues/11708))
28
35
  - The default output limit now leaves 15% of the estimated input unused (at least 4096 tokens), so OpenRouter, which counts the input with its own tokenizer and rejects input plus `max_tokens` above the window, no longer rejects models whose output limit is close to the window with a 400 that was then treated as a context overflow. When that margin would leave less than 32768 tokens of output, only the fixed 4096 margin is kept and output is capped at 32768 (upstream [#10497](https://github.com/earendil-works/pi/issues/10497))
@@ -1 +1 @@
1
- {"schemaVersion":6,"generatedAt":"2026-11-03T22:58:25.773Z","structureHash":"71ee1bb91eb23929d2e3241786bd94c401710318da1183e00f106c8ef95712e3","files":{"amazon-bedrock.json":"91e42fa911ae81bc79e84633cfb1c9d3270e3e21e75967b22b213ccaae566741","ant-ling.json":"628feab3ef6c7d80ce96f75999804e1d9f05fec3851e5302e30fff3b69db90f6","anthropic.json":"f797095e492df25157b14e399ff8030b4d0a75e698f415534cc79f606cf99ffb","azure.json":"93cdf64f2da4e017a88eafdff9169b6e7016e168c1a6aaabe2b8f41da2db9f8f","baseten.json":"5bd3c98c61769388b3724368ef964d16b7a58e41a6edcf4ebceb9d4ac0a21d3b","cerebras.json":"2eb969b2956844f9a641d3de52c19f1791293c58f607282fb3b0ebfe85ff66f8","cloudflare-ai-gateway.json":"080e1103656fdf6a8f085eff8363db11f3c3a4cba4d20691c4b21676fcd2e5dd","cloudflare-workers-ai.json":"0dc5eda87ff6de3ee75ee6d547a60162319bb2d51ed09b1e7d47d8ae9ef8548e","deepseek.json":"10a296fb3e898f7715c80890c8af0af4f5fd58f22dbcd6612fdc5d762157ccdc","fireworks.json":"1fcec33513611a4cdf41c5e75a905c0179edacbf156a70dc1dc4368eaacdc33f","github-copilot.json":"3da2203c87dd32d1f536b9b24ca9470a596fc4953e16447c701227fdf3a383aa","google-vertex.json":"564d692a4292ef12e98c8ec056a39948ea64e10851f5ddaaebcc37b585545231","google.json":"b61fb0e27da5be60e1112e46955c5923656cb4d62bb221f834a9463d764ef5de","groq.json":"087df37206e9eed8b10f1e558e4c496289bef60074b7e8afba4f20fb102b4ec2","huggingface.json":"209cdcf205961ef2ff203486da614232a86a069ebe0e98266189a14a235fac8f","kimi-coding.json":"e6d5bce9045cf533ca9e0d563a7d30a6a1ed48c89a0f539ed4c9d3ac53d4ac8b","meta.json":"563f5ec07973f52ab8c3eb26ef91a36ad8a79e950b37174935666cdcb624bf35","minimax-cn.json":"fa15d1f67a07046d38e191af9bd97ed922ba45a99a11af4ad281151cc6b762aa","minimax.json":"1e0459dda3858ea24151182106fc4179b95f43a0a8dffc1c3d2e7db4c2d9206e","mistral.json":"7e67f69ac2b609fca9f7b721243fb70fa6f4feade3cb20eedcd5786f9eac64f1","moonshotai-cn.json":"1a15468b1edf9205956e4c5ea41fc4cacc14eabf00523b9143e23a38264f57f7","moonshotai.json":"f31cdf2e6c81a403c4cb0e6b7e759ceff2820f966b08dbec80cfafa3f80dfc63","nvidia.json":"0e45bcd4d5a897f6f6785c0e257a9fb03691cef3ff87d9254da5daa5075468da","openai-codex.json":"79856e655a4cdf5ad32f178dd001cbfda5d13e68006ad8aade0bc3636f5faabb","openai-decisions.json":"0c7d54fcbac5e7388872a85c0db7f336c5a57c82d403266e9ae04f87561daf4f","openai-images.json":"885b1c5ec4198ebe2b73518e61cbf989a7cad9229d01813635f361b29a909562","openai.json":"c51bffed14b4bdfb15fbffef068a9c07e973d36dd7490397d5bb7d00483752b3","opencode-go.json":"7e40173ee145c5e60e9789b6c3ae8fc602bf596d83879746f60cdb91f34a2d45","opencode.json":"cc66c9928b5de7a8ffb55ab062769c9d82cac2629ff48ee53747b230cf96219c","openrouter.json":"e1a695d346f47a7c2f655f1d4f26e1fca1f32c8a88f4798acce4111aa459a5e7","qwen-token-plan-cn.json":"64427a6adeb3e7dd1857d68bef9bb12097632b646ed151b740e209143e31341e","qwen-token-plan-individual.json":"0fb7cf64faf39d1a3b0a884210a86c87084b805eda15644f5f39293287b959dd","qwen-token-plan.json":"37b9a76c54090228d1026a8f0fcb4d304b00d64b1a3a94cb2ae6e677d2c52b13","radius.json":"b757791113c3ac1c7b43501d7b4de2ae51b7dad443e34c78650632de395bf925","together.json":"2a28fa1978c996ac0a7f0fc07f0c98a37dbf282afe77c0f141dab0c36791ef83","typesafe.json":"938c89dfb6f636dce1483ec6acc739af4b881f61003d007807a74414eb2bf357","vercel-ai-gateway.json":"30f76070e12493603c85220164f8b356a33725e91ebfe9a79aeb954b53de90c7","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-03T23:12:54.068Z","structureHash":"71ee1bb91eb23929d2e3241786bd94c401710318da1183e00f106c8ef95712e3","files":{"amazon-bedrock.json":"91e42fa911ae81bc79e84633cfb1c9d3270e3e21e75967b22b213ccaae566741","ant-ling.json":"628feab3ef6c7d80ce96f75999804e1d9f05fec3851e5302e30fff3b69db90f6","anthropic.json":"f797095e492df25157b14e399ff8030b4d0a75e698f415534cc79f606cf99ffb","azure.json":"93cdf64f2da4e017a88eafdff9169b6e7016e168c1a6aaabe2b8f41da2db9f8f","baseten.json":"5bd3c98c61769388b3724368ef964d16b7a58e41a6edcf4ebceb9d4ac0a21d3b","cerebras.json":"2eb969b2956844f9a641d3de52c19f1791293c58f607282fb3b0ebfe85ff66f8","cloudflare-ai-gateway.json":"080e1103656fdf6a8f085eff8363db11f3c3a4cba4d20691c4b21676fcd2e5dd","cloudflare-workers-ai.json":"0dc5eda87ff6de3ee75ee6d547a60162319bb2d51ed09b1e7d47d8ae9ef8548e","deepseek.json":"10a296fb3e898f7715c80890c8af0af4f5fd58f22dbcd6612fdc5d762157ccdc","fireworks.json":"1fcec33513611a4cdf41c5e75a905c0179edacbf156a70dc1dc4368eaacdc33f","github-copilot.json":"3da2203c87dd32d1f536b9b24ca9470a596fc4953e16447c701227fdf3a383aa","google-vertex.json":"564d692a4292ef12e98c8ec056a39948ea64e10851f5ddaaebcc37b585545231","google.json":"b61fb0e27da5be60e1112e46955c5923656cb4d62bb221f834a9463d764ef5de","groq.json":"087df37206e9eed8b10f1e558e4c496289bef60074b7e8afba4f20fb102b4ec2","huggingface.json":"209cdcf205961ef2ff203486da614232a86a069ebe0e98266189a14a235fac8f","kimi-coding.json":"e6d5bce9045cf533ca9e0d563a7d30a6a1ed48c89a0f539ed4c9d3ac53d4ac8b","meta.json":"563f5ec07973f52ab8c3eb26ef91a36ad8a79e950b37174935666cdcb624bf35","minimax-cn.json":"fa15d1f67a07046d38e191af9bd97ed922ba45a99a11af4ad281151cc6b762aa","minimax.json":"1e0459dda3858ea24151182106fc4179b95f43a0a8dffc1c3d2e7db4c2d9206e","mistral.json":"7e67f69ac2b609fca9f7b721243fb70fa6f4feade3cb20eedcd5786f9eac64f1","moonshotai-cn.json":"1a15468b1edf9205956e4c5ea41fc4cacc14eabf00523b9143e23a38264f57f7","moonshotai.json":"f31cdf2e6c81a403c4cb0e6b7e759ceff2820f966b08dbec80cfafa3f80dfc63","nvidia.json":"0e45bcd4d5a897f6f6785c0e257a9fb03691cef3ff87d9254da5daa5075468da","openai-codex.json":"79856e655a4cdf5ad32f178dd001cbfda5d13e68006ad8aade0bc3636f5faabb","openai-decisions.json":"0c7d54fcbac5e7388872a85c0db7f336c5a57c82d403266e9ae04f87561daf4f","openai-images.json":"885b1c5ec4198ebe2b73518e61cbf989a7cad9229d01813635f361b29a909562","openai.json":"c51bffed14b4bdfb15fbffef068a9c07e973d36dd7490397d5bb7d00483752b3","opencode-go.json":"7e40173ee145c5e60e9789b6c3ae8fc602bf596d83879746f60cdb91f34a2d45","opencode.json":"cc66c9928b5de7a8ffb55ab062769c9d82cac2629ff48ee53747b230cf96219c","openrouter.json":"e9baa04e10c92b8fda5a21ea04089fc2fab47517daf461ee6da319ebf0939216","qwen-token-plan-cn.json":"64427a6adeb3e7dd1857d68bef9bb12097632b646ed151b740e209143e31341e","qwen-token-plan-individual.json":"0fb7cf64faf39d1a3b0a884210a86c87084b805eda15644f5f39293287b959dd","qwen-token-plan.json":"37b9a76c54090228d1026a8f0fcb4d304b00d64b1a3a94cb2ae6e677d2c52b13","radius.json":"b757791113c3ac1c7b43501d7b4de2ae51b7dad443e34c78650632de395bf925","together.json":"2a28fa1978c996ac0a7f0fc07f0c98a37dbf282afe77c0f141dab0c36791ef83","typesafe.json":"938c89dfb6f636dce1483ec6acc739af4b881f61003d007807a74414eb2bf357","vercel-ai-gateway.json":"30f76070e12493603c85220164f8b356a33725e91ebfe9a79aeb954b53de90c7","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"}}