@oh-my-pi/pi-ai 14.5.13 → 14.6.0
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 +49 -0
- package/package.json +3 -3
- package/src/index.ts +6 -5
- package/src/models.json +1286 -230
- package/src/provider-models/openai-compat.ts +13 -2
- package/src/providers/anthropic.ts +351 -36
- package/src/providers/gitlab-duo.ts +1 -3
- package/src/providers/google-gemini-cli.ts +14 -170
- package/src/providers/google-gemini-headers.ts +141 -0
- package/src/providers/kimi.ts +1 -2
- package/src/providers/openai-codex/request-transformer.ts +1 -1
- package/src/providers/openai-codex-responses.ts +182 -57
- package/src/providers/openai-completions-compat.ts +9 -1
- package/src/providers/openai-completions.ts +109 -44
- package/src/providers/synthetic.ts +1 -2
- package/src/stream.ts +30 -11
- package/src/types.ts +15 -0
- package/src/usage/google-antigravity.ts +1 -1
- package/src/utils/abort.ts +18 -3
- package/src/utils/discovery/antigravity.ts +1 -1
- package/src/utils/json-parse.ts +127 -7
- package/src/utils/oauth/anthropic.ts +78 -40
- package/src/utils/oauth/google-antigravity.ts +2 -2
- package/src/utils/oauth/google-gemini-cli.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,52 @@
|
|
|
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
|
+
|
|
33
|
+
## [14.5.14] - 2026-05-01
|
|
34
|
+
### Added
|
|
35
|
+
|
|
36
|
+
- Added package-level `google-gemini-headers` exports (`getGeminiCliHeaders`, `getGeminiCliUserAgent`, `getAntigravityHeaders`, `extractRetryDelay`, and `ANTIGRAVITY_SYSTEM_INSTRUCTION`) for header and retry handling reuse without importing full Google providers
|
|
37
|
+
|
|
38
|
+
### Changed
|
|
39
|
+
|
|
40
|
+
- Changed package exports and streaming/provider wiring to load heavy Google/Kimi/GitLab/synthetic provider modules lazily through `register-builtins`, reducing startup import overhead from optional provider SDKs
|
|
41
|
+
|
|
42
|
+
### Fixed
|
|
43
|
+
|
|
44
|
+
- Fixed DeepSeek V4 tool-call follow-up 400 errors from three root causes:
|
|
45
|
+
- Mapped `reasoning_effort` "xhigh" to "max" for DeepSeek-family models on any provider (NVIDIA, OpenCode-Go, etc.), not just `deepseek`
|
|
46
|
+
- Recovered `reasoning_content` from thinking blocks with valid signatures that were filtered by the non-empty-text check
|
|
47
|
+
- Added empty-string fallback when `reasoning_content` is genuinely absent (e.g. proxy-stripped) but the provider requires the field
|
|
48
|
+
|
|
5
49
|
## [14.5.13] - 2026-05-01
|
|
50
|
+
|
|
6
51
|
### Breaking Changes
|
|
7
52
|
|
|
8
53
|
- Removed `utils/oauth` re-exports from the package entrypoint, so OAuth helper imports from the root module must be updated
|
|
@@ -14,6 +59,7 @@
|
|
|
14
59
|
- Added provider response metadata callbacks for Anthropic and OpenAI streaming requests.
|
|
15
60
|
|
|
16
61
|
## [14.5.9] - 2026-04-30
|
|
62
|
+
|
|
17
63
|
### Added
|
|
18
64
|
|
|
19
65
|
- Added `usage.reasoningTokens` to OpenAI and Google usage output when providers report reasoning/thinking tokens
|
|
@@ -26,6 +72,7 @@
|
|
|
26
72
|
- Fixed Anthropic streaming usage handling so a previously populated cache TTL breakdown is preserved when later events omit `cache_creation`
|
|
27
73
|
|
|
28
74
|
## [14.5.4] - 2026-04-28
|
|
75
|
+
|
|
29
76
|
### Changed
|
|
30
77
|
|
|
31
78
|
- Changed OpenAI custom Lark grammar payloads to strip comments and blank lines before sending provider requests.
|
|
@@ -35,6 +82,7 @@
|
|
|
35
82
|
- Fixed OpenAI Codex GPT model pricing by inheriting matching OpenAI catalog rates for zero-priced discovered Codex entries.
|
|
36
83
|
|
|
37
84
|
## [14.5.3] - 2026-04-27
|
|
85
|
+
|
|
38
86
|
### Added
|
|
39
87
|
|
|
40
88
|
- Added `fireworks` as a supported provider with API key login flow and credential storage
|
|
@@ -127,6 +175,7 @@
|
|
|
127
175
|
- Preserved user-provided `session_id` and `x-client-request-id` headers in OpenAI Responses requests instead of overriding them with automatic session-derived values
|
|
128
176
|
- Stopped sending `session_id` and `x-client-request-id` headers for OpenAI Responses requests when `cacheRetention` is set to `none`
|
|
129
177
|
- Fixed direct OpenAI Responses requests to send `session_id` and `x-client-request-id` from the same session-derived value as `prompt_cache_key`, improving prompt cache affinity for append-only sessions
|
|
178
|
+
|
|
130
179
|
## [14.1.1] - 2026-04-14
|
|
131
180
|
|
|
132
181
|
### Added
|
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.
|
|
4
|
+
"version": "14.6.0",
|
|
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.
|
|
50
|
-
"@oh-my-pi/pi-utils": "14.
|
|
49
|
+
"@oh-my-pi/pi-natives": "14.6.0",
|
|
50
|
+
"@oh-my-pi/pi-utils": "14.6.0",
|
|
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
|
@@ -10,14 +10,15 @@ export * from "./provider-details";
|
|
|
10
10
|
export * from "./provider-models";
|
|
11
11
|
export * from "./providers/anthropic";
|
|
12
12
|
export * from "./providers/azure-openai-responses";
|
|
13
|
-
export * from "./providers/cursor";
|
|
13
|
+
export type * from "./providers/cursor";
|
|
14
14
|
export * from "./providers/gitlab-duo";
|
|
15
|
-
export * from "./providers/google";
|
|
16
|
-
export * from "./providers/google-gemini-cli";
|
|
17
|
-
export * from "./providers/google-
|
|
15
|
+
export type * from "./providers/google";
|
|
16
|
+
export type * from "./providers/google-gemini-cli";
|
|
17
|
+
export * from "./providers/google-gemini-headers";
|
|
18
|
+
export type * from "./providers/google-vertex";
|
|
18
19
|
export * from "./providers/kimi";
|
|
19
20
|
export * from "./providers/ollama";
|
|
20
|
-
export
|
|
21
|
+
export * from "./providers/openai-codex-responses";
|
|
21
22
|
export * from "./providers/openai-completions";
|
|
22
23
|
export * from "./providers/openai-responses";
|
|
23
24
|
export * from "./providers/synthetic";
|