@oh-my-pi/pi-ai 14.5.14 → 14.6.1

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
@@ -2,6 +2,34 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [14.6.0] - 2026-05-02
6
+
7
+ ### Added
8
+
9
+ - Added `disableReasoning` to stream and OpenAI completion options to force reasoning off for models that support it, sending `reasoning: { enabled: false }` for OpenRouter-compatible requests
10
+ - Added `thinkingDisplay` option to Anthropic options to control whether adaptive and explicit reasoning is returned as `summarized` or `omitted`
11
+ - Added Anthropic model compatibility flags `supportsEagerToolInputStreaming` and `supportsLongCacheRetention` for API-capability-specific request behavior
12
+
13
+ ### Changed
14
+
15
+ - Changed Anthropic request payloads to send `thinking: { type: "disabled" }` when `thinkingEnabled` is explicitly `false` on reasoning-enabled models
16
+ - Changed Anthropic cache retention handling so `cacheRetention: "long"` now uses `ttl: "1h"` only for canonical Anthropic endpoints with long-cache support
17
+ - Changed Anthropic tool schema generation to include `eager_input_streaming` only on models that advertise support
18
+ - Changed Anthropic OAuth login flow to include browser fallback guidance and richer error context when token exchange or refresh fails
19
+
20
+ ### Fixed
21
+
22
+ - Fixed Anthropic non-thinking requests to include the caller-provided `temperature` value in request payloads
23
+ - Fixed Anthropic `claude-opus-4-7` non-thinking payloads to omit sampling fields (`temperature`, `top_p`, and `top_k`)
24
+ - Fixed OpenAI Codex base URL normalization so configured base URLs with or without `/codex` or `/codex/responses` now resolve to `/codex/responses`
25
+ - Fixed OpenAI Codex websocket handling to parse JSON from non-string message payloads including `ArrayBuffer`, typed arrays, and `Blob` values
26
+ - Fixed OpenAI Codex websocket handshakes to replace stale `openai-beta` values with the websocket beta and avoid sending request-body headers over websocket transport
27
+ - Fixed abort tracking so caller-initiated cancellations are treated as user aborts even after local watchdog timeouts, preventing unintended automatic retries
28
+ - Fixed Anthropic stream handling to parse raw SSE envelopes directly, ignore unrelated events, and repair malformed JSON in SSE payloads
29
+ - Fixed Anthropic streaming to emit an explicit error when the SSE stream ends without a `message_stop` event
30
+ - Fixed OpenAI Codex websocket continuations to send true `previous_response_id` deltas for `store: false` transcripts, expose request stats, and default text verbosity to `low` unless explicitly overridden.
31
+ - Fixed OpenAI Codex websocket append reuse after `response.completed` terminal events.
32
+
5
33
  ## [14.5.14] - 2026-05-01
6
34
  ### Added
7
35
 
@@ -2208,4 +2236,4 @@ _Dedicated to Peter's shoulder ([@steipete](https://twitter.com/steipete))_
2208
2236
 
2209
2237
  ## [0.9.4] - 2025-11-26
2210
2238
 
2211
- Initial release with multi-provider LLM support.
2239
+ Initial release with multi-provider LLM support.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@oh-my-pi/pi-ai",
4
- "version": "14.5.14",
4
+ "version": "14.6.1",
5
5
  "description": "Unified LLM API with automatic model discovery and provider configuration",
6
6
  "homepage": "https://github.com/can1357/oh-my-pi",
7
7
  "author": "Can Boluk",
@@ -46,8 +46,8 @@
46
46
  "@aws-sdk/credential-provider-node": "^3.972.36",
47
47
  "@bufbuild/protobuf": "^2.12.0",
48
48
  "@google/genai": "^1.50.1",
49
- "@oh-my-pi/pi-natives": "14.5.14",
50
- "@oh-my-pi/pi-utils": "14.5.14",
49
+ "@oh-my-pi/pi-natives": "14.6.1",
50
+ "@oh-my-pi/pi-utils": "14.6.1",
51
51
  "@sinclair/typebox": "^0.34.49",
52
52
  "@smithy/node-http-handler": "^4.6.1",
53
53
  "ajv": "^8.20.0",
package/src/index.ts CHANGED
@@ -18,7 +18,7 @@ export * from "./providers/google-gemini-headers";
18
18
  export type * from "./providers/google-vertex";
19
19
  export * from "./providers/kimi";
20
20
  export * from "./providers/ollama";
21
- export type { OpenAICodexResponsesOptions } from "./providers/openai-codex-responses";
21
+ export * from "./providers/openai-codex-responses";
22
22
  export * from "./providers/openai-completions";
23
23
  export * from "./providers/openai-responses";
24
24
  export * from "./providers/synthetic";
package/src/models.json CHANGED
@@ -28105,6 +28105,44 @@
28105
28105
  "contextWindow": 222222,
28106
28106
  "maxTokens": 8888
28107
28107
  },
28108
+ "poolside/laguna-m.1": {
28109
+ "id": "poolside/laguna-m.1",
28110
+ "name": "poolside/laguna-m.1",
28111
+ "api": "openai-completions",
28112
+ "provider": "nanogpt",
28113
+ "baseUrl": "https://nano-gpt.com/api/v1",
28114
+ "reasoning": false,
28115
+ "input": [
28116
+ "text"
28117
+ ],
28118
+ "cost": {
28119
+ "input": 0,
28120
+ "output": 0,
28121
+ "cacheRead": 0,
28122
+ "cacheWrite": 0
28123
+ },
28124
+ "contextWindow": 222222,
28125
+ "maxTokens": 8888
28126
+ },
28127
+ "poolside/laguna-xs.2": {
28128
+ "id": "poolside/laguna-xs.2",
28129
+ "name": "poolside/laguna-xs.2",
28130
+ "api": "openai-completions",
28131
+ "provider": "nanogpt",
28132
+ "baseUrl": "https://nano-gpt.com/api/v1",
28133
+ "reasoning": false,
28134
+ "input": [
28135
+ "text"
28136
+ ],
28137
+ "cost": {
28138
+ "input": 0,
28139
+ "output": 0,
28140
+ "cacheRead": 0,
28141
+ "cacheWrite": 0
28142
+ },
28143
+ "contextWindow": 222222,
28144
+ "maxTokens": 8888
28145
+ },
28108
28146
  "qvq-max": {
28109
28147
  "id": "qvq-max",
28110
28148
  "name": "qvq-max",
@@ -35776,9 +35814,9 @@
35776
35814
  "minimax-m2.7": {
35777
35815
  "id": "minimax-m2.7",
35778
35816
  "name": "MiniMax M2.7",
35779
- "api": "anthropic-messages",
35817
+ "api": "openai-completions",
35780
35818
  "provider": "opencode-go",
35781
- "baseUrl": "https://opencode.ai/zen/go",
35819
+ "baseUrl": "https://opencode.ai/zen/go/v1",
35782
35820
  "reasoning": true,
35783
35821
  "input": [
35784
35822
  "text"
@@ -35792,7 +35830,7 @@
35792
35830
  "contextWindow": 204800,
35793
35831
  "maxTokens": 131072,
35794
35832
  "thinking": {
35795
- "mode": "budget",
35833
+ "mode": "effort",
35796
35834
  "minLevel": "minimal",
35797
35835
  "maxLevel": "xhigh"
35798
35836
  }
@@ -38485,7 +38523,7 @@
38485
38523
  "cacheRead": 0.024999999999999998,
38486
38524
  "cacheWrite": 0.08333333333333334
38487
38525
  },
38488
- "contextWindow": 1000000,
38526
+ "contextWindow": 1048576,
38489
38527
  "maxTokens": 8192
38490
38528
  },
38491
38529
  "google/gemini-2.0-flash-lite-001": {
@@ -42996,13 +43034,13 @@
42996
43034
  "image"
42997
43035
  ],
42998
43036
  "cost": {
42999
- "input": 0.325,
43000
- "output": 3.25,
43037
+ "input": 0.32,
43038
+ "output": 3.1999999999999997,
43001
43039
  "cacheRead": 0,
43002
43040
  "cacheWrite": 0
43003
43041
  },
43004
- "contextWindow": 256000,
43005
- "maxTokens": 65536,
43042
+ "contextWindow": 262144,
43043
+ "maxTokens": 81920,
43006
43044
  "thinking": {
43007
43045
  "mode": "effort",
43008
43046
  "minLevel": "minimal",
@@ -55034,6 +55072,26 @@
55034
55072
  "contextWindow": 2000000,
55035
55073
  "maxTokens": 30000
55036
55074
  },
55075
+ "x-ai/grok-4.3": {
55076
+ "id": "x-ai/grok-4.3",
55077
+ "name": "xAI: Grok 4.3",
55078
+ "api": "openai-completions",
55079
+ "provider": "zenmux",
55080
+ "baseUrl": "https://zenmux.ai/api/v1",
55081
+ "reasoning": false,
55082
+ "input": [
55083
+ "text",
55084
+ "image"
55085
+ ],
55086
+ "cost": {
55087
+ "input": 1.25,
55088
+ "output": 2.5,
55089
+ "cacheRead": 0.2,
55090
+ "cacheWrite": 0
55091
+ },
55092
+ "contextWindow": 1000000,
55093
+ "maxTokens": 8888
55094
+ },
55037
55095
  "x-ai/grok-code-fast-1": {
55038
55096
  "id": "x-ai/grok-code-fast-1",
55039
55097
  "name": "Grok Code Fast 1",
@@ -1868,12 +1868,18 @@ function createOpenCodeApiResolution(
1868
1868
  }
1869
1869
 
1870
1870
  const OPENCODE_ZEN_API_RESOLUTION = createOpenCodeApiResolution("https://opencode.ai/zen");
1871
- // OpenCode Go: models.dev declares qwen3.5-plus / qwen3.6-plus with
1872
- // `provider.npm = "@ai-sdk/anthropic"`, but per the OpenCode Go endpoint table
1873
- // (https://opencode.ai/docs/go/#endpoints) they are served via @ai-sdk/alibaba
1874
- // at https://opencode.ai/zen/go/v1/chat/completions (OpenAI-compatible).
1875
- // Override the resolver so regenerating models.json keeps the correct routing.
1871
+ // OpenCode Go: models.dev declares minimax-m2.7 / qwen3.5-plus / qwen3.6-plus
1872
+ // with `provider.npm = "@ai-sdk/anthropic"`, but the OpenCode Go gateway only
1873
+ // serves them at `https://opencode.ai/zen/go/v1/chat/completions` (verified
1874
+ // against https://opencode.ai/zen/go/v1/models and the upstream endpoint
1875
+ // table at https://opencode.ai/docs/go/#endpoints minimax-m2.5 works the
1876
+ // same way and lacks an `npm` field on models.dev so it already falls through
1877
+ // to the openai-completions default). Without this override the resolver
1878
+ // would POST anthropic-style requests to /v1/messages and the gateway would
1879
+ // return its `Page Not Found` HTML (issue #887). Override the resolver so
1880
+ // regenerating models.json keeps the correct routing.
1876
1881
  const OPENCODE_GO_API_RESOLUTION = createOpenCodeApiResolution("https://opencode.ai/zen/go", {
1882
+ "minimax-m2.7": "openai-completions",
1877
1883
  "qwen3.5-plus": "openai-completions",
1878
1884
  "qwen3.6-plus": "openai-completions",
1879
1885
  });