@oh-my-pi/pi-ai 18.2.0 → 18.2.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 +35 -0
- package/dist/types/auth-broker/remote-store.d.ts +17 -0
- package/dist/types/auth-gateway/index.d.ts +1 -0
- package/dist/types/auth-gateway/session-state.d.ts +65 -0
- package/dist/types/auth-storage.d.ts +16 -0
- package/dist/types/error/body-error.d.ts +15 -0
- package/dist/types/error/flags.d.ts +16 -0
- package/dist/types/error/index.d.ts +1 -0
- package/dist/types/oneshot-retry.d.ts +6 -0
- package/dist/types/providers/openai-codex/request-transformer.d.ts +27 -0
- package/dist/types/providers/openai-shared.d.ts +20 -3
- package/dist/types/registry/oauth/perplexity.d.ts +1 -7
- package/dist/types/registry/oauth/types.d.ts +8 -0
- package/dist/types/stream.d.ts +2 -0
- package/dist/types/types.d.ts +3 -1
- package/dist/types/usage.d.ts +8 -0
- package/dist/types/utils/block-symbols.d.ts +36 -0
- package/dist/types/utils/openai-http.d.ts +2 -0
- package/dist/types/utils/retry-after.d.ts +2 -0
- package/dist/types/utils/schema/wire.d.ts +4 -5
- package/dist/types/utils.d.ts +9 -0
- package/package.json +6 -6
- package/src/auth-broker/remote-store.ts +73 -8
- package/src/auth-broker/wire-schemas.ts +1 -0
- package/src/auth-gateway/index.ts +1 -0
- package/src/auth-gateway/server.ts +48 -11
- package/src/auth-gateway/session-state.ts +114 -0
- package/src/auth-storage.ts +144 -13
- package/src/error/body-error.ts +310 -0
- package/src/error/flags.ts +63 -13
- package/src/error/index.ts +1 -0
- package/src/error/retryable.ts +2 -0
- package/src/oneshot-retry.ts +13 -3
- package/src/providers/anthropic-messages-server.ts +24 -3
- package/src/providers/anthropic.ts +101 -15
- package/src/providers/cursor.ts +7 -1
- package/src/providers/devin.ts +82 -28
- package/src/providers/openai-chat-server.ts +4 -0
- package/src/providers/openai-codex/request-transformer.ts +36 -0
- package/src/providers/openai-codex-responses.ts +35 -12
- package/src/providers/openai-completions.ts +43 -12
- package/src/providers/openai-reasoning-fallback.ts +6 -6
- package/src/providers/openai-responses-server.ts +2 -1
- package/src/providers/openai-responses.ts +25 -4
- package/src/providers/openai-shared.ts +199 -51
- package/src/registry/oauth/perplexity.ts +94 -28
- package/src/registry/oauth/types.ts +9 -0
- package/src/stream.ts +23 -2
- package/src/types.ts +3 -0
- package/src/usage/claude.ts +33 -0
- package/src/usage/google-antigravity.ts +8 -2
- package/src/usage.ts +3 -0
- package/src/utils/block-symbols.ts +57 -0
- package/src/utils/openai-http.ts +39 -3
- package/src/utils/retry-after.ts +12 -0
- package/src/utils/schema/normalize.ts +3 -3
- package/src/utils/schema/stamps.ts +33 -45
- package/src/utils/schema/wire.ts +9 -7
- package/src/utils.ts +67 -22
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,41 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [18.2.1] - 2026-09-15
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Added support for Cerebras Qwen 3.8-27b with improved reasoning effort control
|
|
10
|
+
- Added optional host browser-session callbacks for Perplexity SSO login, keeping browser automation out of pi-ai and preserving email and authenticator-code login.
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- Fixed the auth-gateway sending a model's own reasoning back to Anthropic as demoted plain text, which tripped the `reasoning_extraction` classifier on Fable, leaked reasoning into visible answers on Opus, Sonnet and Haiku, and broke the prompt cache prefix on every tool-calling turn. Replayed assistant turns now carry the model id the request resolves to and a `stopReason` derived from the turn's own tool calls, so same-model thinking blocks keep their signatures and replay natively ([#12115](https://github.com/can1357/oh-my-pi/pull/12115) by [@Zhu-Aemon](https://github.com/Zhu-Aemon)).
|
|
15
|
+
- Fixed custom OpenAI-compatible Responses streams crashing on omitted delta payloads or reasoning-summary fields, and recovered text delivered only in completed snapshots ([#11863](https://github.com/can1357/oh-my-pi/pull/11863) by [@moodiness](https://github.com/moodiness)).
|
|
16
|
+
- Fixed streaming CPU blowup on long Responses turns: per-delta content-index lookups are now O(1) instead of re-scanning the accumulated content blocks, eliminating the quadratic work that could freeze the TUI for tens of seconds to minutes while a subagent streams ([#10605](https://github.com/can1357/oh-my-pi/issues/10605)).
|
|
17
|
+
- Fixed sessions permanently wedged by `400 Invalid signature in thinking block` after a failover proxy swapped upstream models mid-conversation (e.g. Claude -> GLM -> Claude): when the unsigned-demotion retry fails identically, the anthropic-messages transport now retries once with replayed thinking dropped and pins that mode for the session, so the conversation continues without starting a new session ([#12006](https://github.com/can1357/oh-my-pi/pull/12006) by [@Damin-Lee](https://github.com/Damin-Lee)).
|
|
18
|
+
- Fixed OpenAI Codex backend rejecting requests with HTTP 400 (`string_above_max_length`) when replaying tool call IDs exceeding 64 characters or containing composite delimiters (`|`, `\n`) by sanitizing and deterministically clamping call IDs on the wire ([#11342](https://github.com/can1357/oh-my-pi/pull/11342)).
|
|
19
|
+
- Fixed OpenRouter multi-turn tool-call sessions failing with `400 Referenced reasoning item ... was not found or has expired` on Meta Muse Spark models by suppressing reasoning reconstruction when history is filtered and synthetic replay is disallowed, while preserving Anthropic and DeepSeek replay ([#10966](https://github.com/can1357/oh-my-pi/issues/10966)).
|
|
20
|
+
- The auth gateway now keeps provider session state per session, so a model reached through it stops re-learning the same rejection every turn. Sticky fallbacks such as strict-tools and fast mode previously did nothing on the `pi-native` transport used by containerized and robomp deployments, because the state cannot cross the wire and the gateway kept none of its own ([#12058](https://github.com/can1357/oh-my-pi/pull/12058) by [@camjac251](https://github.com/camjac251)).
|
|
21
|
+
- Fixed full OpenAI Responses request-body timeout recovery so the exact HTTP 408 is surfaced for a changed-request recovery instead of repeated unchanged transport retries when eligible tool-result history can be safely elided ([#11878](https://github.com/can1357/oh-my-pi/pull/11878) by [@hellofrommorgan](https://github.com/hellofrommorgan)).
|
|
22
|
+
- Fixed Codex sessions producing unrelated visible output on later turns after a progress-only response. ([#11466](https://github.com/can1357/oh-my-pi/issues/11466))
|
|
23
|
+
- Fixed OpenRouter reasoning models (e.g. Meta Muse Spark) rejecting every turn with `400 Provider returned error` after the session history contains a tool-call turn from another provider, by no longer sending a fabricated reasoning item id ([#11791](https://github.com/can1357/oh-my-pi/pull/11791) by [@brndnmtthws](https://github.com/brndnmtthws)).
|
|
24
|
+
- Fixed statusless stream-drop diagnostics (stream disconnected/closed before `response.completed`, upstream stream interrupted or ended before its terminal chunk, socket disconnected before the secure TLS handshake) classifying as terminal errors, so they now retry like their status-tagged twins instead of settling the turn ([#11805](https://github.com/can1357/oh-my-pi/issues/11805)).
|
|
25
|
+
- OpenAI-compatible endpoints that report `ReasoningEffort` in CamelCase now trigger effort-downgrade retries instead of terminating turns with HTTP 400 ([#11804](https://github.com/can1357/oh-my-pi/issues/11804)).
|
|
26
|
+
- Fixed openai-responses replay wedging a repaired orphan tool-result note between another call's `function_call` and `function_call_output`, which broke round pairing on strict validators (e.g. DeepSeek) with `400 No tool output found for tool call …`: orphan-output/call repair now runs before the interleaved-message hoist, so any injected note is relocated out of the tool-call batch ([#11473](https://github.com/can1357/oh-my-pi/issues/11473)).
|
|
27
|
+
- A stale Anthropic tier block (`tier:fable`, `tier:mythos`) is now cleared once a live usage report shows headroom on both the tier row and the shared windows, instead of idling a usable account until the reported reset. Healing requires a live report, and a credential held by an unscoped block spends no usage request on a probe that cannot lift it ([#11334](https://github.com/can1357/oh-my-pi/pull/11334) by [@AshishKumar4](https://github.com/AshishKumar4)).
|
|
28
|
+
- A running session now picks up credentials another process committed: adding an account in a second terminal is visible to credential selection and rotation without restarting the session, and a session's pinned account is re-resolved by row id so a row another process deleted cannot hand its slot to a sibling ([#11329](https://github.com/can1357/oh-my-pi/pull/11329) by [@AshishKumar4](https://github.com/AshishKumar4)).
|
|
29
|
+
- Fixed rate-limit/overload failures that arrive *inside* an HTTP 200 body (Azure, LiteLLM-style aggregators, and reverse proxies that already committed to the stream) not advancing `retry.fallbackChains`: a `{"error":{…}}`/`{"code":429}` chunk or a plain-text throttle frame (`429 Too Many Requests`, an nginx page) is now classified as a retryable 429/5xx through the same path an HTTP-status 429 takes, so a busy provider backs off and fails over instead of ending the session. Only bodies the provider actually reported are used: no status is inferred from error wording, and an unreadable body can no longer consume a credential.
|
|
30
|
+
- Fixed tool schema normalization and cycle detection for frozen, sealed, and nonextensible schemas.
|
|
31
|
+
- Reduced memory retained by `complete()` and `completeSimple()` while streaming responses.
|
|
32
|
+
- Antigravity quota summaries now identify Claude/GPT routing copies as one shared upstream pool while preserving model-specific quota selection ([#11268](https://github.com/can1357/oh-my-pi/issues/11268)).
|
|
33
|
+
- Fixed the auth-gateway rejecting `content: null` on `/v1/responses` and `/v1/chat/completions` message items with a 400; Codex and other OpenAI clients that emit null content on empty turns now work, matching OpenAI's tolerance ([#10956](https://github.com/can1357/oh-my-pi/issues/10956)).
|
|
34
|
+
- Fixed Azure GPT-6 Astra Chat Completions requests with function tools sending a non-`none` reasoning effort, which Azure rejects with HTTP 400 ([#11052](https://github.com/can1357/oh-my-pi/issues/11052)).
|
|
35
|
+
- Fixed Z.AI and Zhipu usage-limit credential blocks and oneshot completion retries (titles, summaries, classifiers) resolving eight hours late when provider responses omit the reset timestamp timezone ([#11014](https://github.com/can1357/oh-my-pi/issues/11014)).
|
|
36
|
+
- Fixed provider requests failing with `ENOENT` when another process removes a stale shared concurrency lock during acquisition.
|
|
37
|
+
- Fixed Devin-hosted Gemini models rejecting turns that include nullable tool parameters by normalizing tool schemas to Gemini's supported JSON Schema dialect ([#8647](https://github.com/can1357/oh-my-pi/issues/8647), [#10233](https://github.com/can1357/oh-my-pi/pull/10233) by [@will-bogusz](https://github.com/will-bogusz)).
|
|
38
|
+
- Fixed Devin gateway failures leaking raw proxy HTML into turn errors; HTTP status and retry metadata remain available for recovery ([#10233](https://github.com/can1357/oh-my-pi/pull/10233) by [@will-bogusz](https://github.com/will-bogusz)).
|
|
39
|
+
|
|
5
40
|
## [18.2.0] - 2026-09-15
|
|
6
41
|
|
|
7
42
|
### Added
|
|
@@ -51,6 +51,23 @@ export declare class RemoteAuthCredentialStore implements AuthCredentialStore {
|
|
|
51
51
|
get snapshot(): SnapshotResponse;
|
|
52
52
|
/** Re-hydrate the in-memory snapshot from the broker. */
|
|
53
53
|
refreshSnapshot(): Promise<SnapshotResponse>;
|
|
54
|
+
/**
|
|
55
|
+
* Stateful probe for broker-side credential changes, mirroring
|
|
56
|
+
* {@link SqliteAuthCredentialStore.pollExternalChanges} so long-lived broker
|
|
57
|
+
* clients (notably `auth-gateway serve`) pick up logins/logouts made by
|
|
58
|
+
* another process without a restart.
|
|
59
|
+
*
|
|
60
|
+
* Compares a local content revision, not the broker's numeric generation:
|
|
61
|
+
* generation is an in-memory counter that resets when the broker process
|
|
62
|
+
* restarts, so a reconnecting stream can deliver a different credential set
|
|
63
|
+
* under a repeated (or lower) generation. {@link #refreshCredentialRevision}
|
|
64
|
+
* bumps the revision whenever the applied credential material actually
|
|
65
|
+
* changes, catching those cases too. Records foreground activity first: a
|
|
66
|
+
* low-traffic client's background sync parks after `#backgroundIdleMs`, and
|
|
67
|
+
* without this wakeup it would never fetch the new snapshot to report in the
|
|
68
|
+
* first place.
|
|
69
|
+
*/
|
|
70
|
+
pollExternalChanges(): boolean;
|
|
54
71
|
listAuthCredentials(provider?: string): StoredAuthCredential[];
|
|
55
72
|
/** Broker-backed disabled tombstones; empty against brokers predating the endpoint. */
|
|
56
73
|
listDisabledCredentials(provider?: string, signal?: AbortSignal): Promise<DisabledCredentialSummary[]>;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server-owned provider session state for the auth-gateway.
|
|
3
|
+
*
|
|
4
|
+
* `SimpleStreamOptions.providerSessionState` is how a provider keeps what it
|
|
5
|
+
* learned about an endpoint across turns of one conversation: Anthropic's
|
|
6
|
+
* sticky `strictToolsDisabled` / `fastModeDisabled` /
|
|
7
|
+
* `replayUnsignedThinkingDisabled` flags and dropped-thinking-prefix set,
|
|
8
|
+
* OpenAI's strict-tools and reasoning-effort fallbacks, Codex's WebSocket and
|
|
9
|
+
* turn-state sessions. An in-process omp session owns that `Map` for its whole
|
|
10
|
+
* lifetime, so a grammar-too-large 400 or a fast-mode rejection costs one
|
|
11
|
+
* wasted round-trip per session rather than one per turn.
|
|
12
|
+
*
|
|
13
|
+
* The map is deliberately non-serializable — `Set`/`Map` fields, live sockets,
|
|
14
|
+
* a `close()` method — so `pi-native-client` strips it from the wire and
|
|
15
|
+
* `pi-native-server` never accepts it. Gateway clients therefore cannot bring
|
|
16
|
+
* their own, and without a server-side owner every containerized / robomp turn
|
|
17
|
+
* re-learns every lesson from a fresh upstream rejection.
|
|
18
|
+
*
|
|
19
|
+
* A plain `Map<sessionId, …>` in a long-lived server process is a leak: nothing
|
|
20
|
+
* ever reclaims an entry, and the entries own timers and sockets. This store is
|
|
21
|
+
* an LRU with a hard entry ceiling that calls `close()` on everything it drops
|
|
22
|
+
* and on everything it still holds at shutdown.
|
|
23
|
+
*/
|
|
24
|
+
import type { Api, Model, ProviderSessionState } from "../types.js";
|
|
25
|
+
/**
|
|
26
|
+
* Retained logical sessions. Each entry is a handful of small provider records
|
|
27
|
+
* plus, for Codex, a WebSocket session — cheap to keep, but not free, so the
|
|
28
|
+
* ceiling is what turns "one entry per session id forever" into a bounded cost.
|
|
29
|
+
* Eviction is least-recently-used, so the ceiling only ever drops sessions that
|
|
30
|
+
* have been quiet longer than the 256 most recent ones.
|
|
31
|
+
*/
|
|
32
|
+
export declare const AUTH_GATEWAY_MAX_SESSION_STATES = 256;
|
|
33
|
+
/**
|
|
34
|
+
* Bounded per-session provider state, owned by one gateway server instance.
|
|
35
|
+
*
|
|
36
|
+
* Two gateways in the same process get separate stores, so neither can hand a
|
|
37
|
+
* request another gateway's learned state or close it out from under one.
|
|
38
|
+
*/
|
|
39
|
+
export declare class AuthGatewaySessionStateStore {
|
|
40
|
+
#private;
|
|
41
|
+
constructor(max?: number);
|
|
42
|
+
/** Retained logical sessions. */
|
|
43
|
+
get size(): number;
|
|
44
|
+
/**
|
|
45
|
+
* The provider-session map for one logical session on one model, created on
|
|
46
|
+
* first use and returned by reference so provider mutations persist into the
|
|
47
|
+
* next request.
|
|
48
|
+
*
|
|
49
|
+
* Keyed by session + provider + model id. The session is the identity that
|
|
50
|
+
* matters — it is the same identity used for credential stickiness and
|
|
51
|
+
* prefix-cache keying — but a client is free to reuse one session id across
|
|
52
|
+
* models, and the coarsest provider entries do not separate models
|
|
53
|
+
* themselves (`openai-responses` keys its strict-tools / history-replay
|
|
54
|
+
* record by provider alone, Antigravity by a single constant), so the model
|
|
55
|
+
* belongs in the key here. Endpoint is deliberately absent: every provider
|
|
56
|
+
* whose learning is endpoint-specific already sub-keys it internally
|
|
57
|
+
* (`anthropic-messages:${baseUrl}\0${modelId}`,
|
|
58
|
+
* `openai-completions:${provider}:${baseUrl}:${modelId}`), and repeating it
|
|
59
|
+
* would only fragment the map. NUL separates the components so none of them
|
|
60
|
+
* can forge the boundary.
|
|
61
|
+
*/
|
|
62
|
+
acquire(sessionId: string, model: Model<Api>): Map<string, ProviderSessionState>;
|
|
63
|
+
/** Close and drop every retained state. Called when the gateway shuts down. */
|
|
64
|
+
close(): void;
|
|
65
|
+
}
|
|
@@ -502,6 +502,11 @@ export { isDefinitiveOAuthFailure } from "./error/auth-classify.js";
|
|
|
502
502
|
* the usage report reveals. Callers that wait the account out (instead of
|
|
503
503
|
* rotating) must sleep until this, not the error-text hint alone.
|
|
504
504
|
*
|
|
505
|
+
* `requestedBlockedUntilMs` (epoch ms) is this mark call's initial deadline,
|
|
506
|
+
* before usage-report correction and longest-wins merging. Callers use it to
|
|
507
|
+
* distinguish the call's replaceable heuristic from a longer merged block
|
|
508
|
+
* that credential selection will continue enforcing.
|
|
509
|
+
*
|
|
505
510
|
* `priorBlockedUntilMs` (epoch ms) is the live block deadline the map already
|
|
506
511
|
* stored for this credential before this call. The merged `blockedUntilMs`
|
|
507
512
|
* masks a pre-existing block shorter than this call's own heuristic
|
|
@@ -527,6 +532,8 @@ export interface UsageLimitMarkResult {
|
|
|
527
532
|
switched: boolean;
|
|
528
533
|
retryAtMs?: number;
|
|
529
534
|
blockedUntilMs?: number;
|
|
535
|
+
/** This mark call's initial deadline, before report correction and merging. */
|
|
536
|
+
requestedBlockedUntilMs?: number;
|
|
530
537
|
priorBlockedUntilMs?: number;
|
|
531
538
|
priorBlockedUntilTimed?: boolean;
|
|
532
539
|
reportResetAtMs?: number;
|
|
@@ -1116,6 +1123,15 @@ export declare class AuthStorage {
|
|
|
1116
1123
|
pinSessionOAuthAccount(provider: string, sessionId: string, credentialId: number, options?: {
|
|
1117
1124
|
lastUsedAtMs?: number;
|
|
1118
1125
|
}): boolean;
|
|
1126
|
+
/**
|
|
1127
|
+
* Copy every stored credential affinity from one live session to another.
|
|
1128
|
+
*
|
|
1129
|
+
* The target receives its own sticky entries, so request resolution, usage
|
|
1130
|
+
* blocking, credential rotation, metadata, and persisted pins all continue
|
|
1131
|
+
* through the target session id without retaining a live dependency on the
|
|
1132
|
+
* source session.
|
|
1133
|
+
*/
|
|
1134
|
+
inheritSessionCredentials(sourceSessionId: string, targetSessionId: string): number;
|
|
1119
1135
|
/**
|
|
1120
1136
|
* Resolve every stored OAuth credential for `provider` independently.
|
|
1121
1137
|
*
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Build the classified error for an in-band failure frame, or `undefined` when
|
|
3
|
+
* the frame is not a retryable in-band failure (in which case the caller keeps
|
|
4
|
+
* its existing handling and message).
|
|
5
|
+
*
|
|
6
|
+
* @param frame decoded SSE `data:` payload, or the `{ error, response }` subset of one
|
|
7
|
+
*/
|
|
8
|
+
export declare function createInBandProviderError(frame: unknown): Error | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* Build the classified error for a non-JSON SSE frame: gateways and reverse
|
|
11
|
+
* proxies that answer `data: 429 Too Many Requests` or an HTML throttle page
|
|
12
|
+
* instead of an OpenAI envelope. `undefined` when the text is not recognisable
|
|
13
|
+
* as a throttle, so genuinely malformed payloads keep failing loudly.
|
|
14
|
+
*/
|
|
15
|
+
export declare function createInBandProviderErrorFromText(text: string): Error | undefined;
|
|
@@ -34,6 +34,15 @@ export declare const PYTHON_HTTP2_STREAM_RESET_PATTERN: RegExp;
|
|
|
34
34
|
export declare const PYTHON_HTTP_INCOMPLETE_CHUNK_PATTERN: RegExp;
|
|
35
35
|
/** reqwest body-frame failures forwarded by the Codex HTTP proxy. */
|
|
36
36
|
export declare const CODEX_HTTP_BODY_READ_ERROR_PATTERN: RegExp;
|
|
37
|
+
/** Exact HTTP request-body-read timeout diagnostic. */
|
|
38
|
+
export declare function isRequestBodyReadTimeout(status: number | undefined, message: string | undefined): boolean;
|
|
39
|
+
/** Exact pre-output Responses 408 that needs a changed-request recovery path. */
|
|
40
|
+
export declare function isResponsesRequestBodyReadTimeout(message: {
|
|
41
|
+
api?: Api;
|
|
42
|
+
errorStatus?: number;
|
|
43
|
+
errorMessage?: string;
|
|
44
|
+
requestBodyReadTimeoutFullReplay?: boolean;
|
|
45
|
+
}): boolean;
|
|
37
46
|
export declare const TRANSIENT_TRANSPORT_PATTERN: RegExp;
|
|
38
47
|
/**
|
|
39
48
|
* Local llama.cpp / Ollama deterministic tool-call argument JSON parse failure.
|
|
@@ -131,6 +140,13 @@ export declare function stringify(id: number | undefined): string;
|
|
|
131
140
|
* low-signal to trust once detached from a live transport `Error`, which keeps the broad pattern.
|
|
132
141
|
*/
|
|
133
142
|
export declare function isTransientStreamParseError(error: unknown): boolean;
|
|
143
|
+
/**
|
|
144
|
+
* Transport stream-drop diagnostic (see {@link STREAM_DROP_PATTERN}). Unlike
|
|
145
|
+
* {@link isTransientStreamParseError}, one pattern serves both the live `Error`
|
|
146
|
+
* and the persisted-string forms: the phrasings are high-signal enough to trust
|
|
147
|
+
* detached from a transport `Error`.
|
|
148
|
+
*/
|
|
149
|
+
export declare function isTransientStreamDropError(error: unknown): boolean;
|
|
134
150
|
/** Any malformed stream-envelope error (prefix-tagged or out-of-order events). */
|
|
135
151
|
export declare function isStreamEnvelopeError(error: unknown): boolean;
|
|
136
152
|
/** Stream-envelope errors safe to retry against the provider (event ordering only). */
|
|
@@ -63,6 +63,12 @@ export interface OneshotRetryOptions {
|
|
|
63
63
|
* Thrown errors need no wiring — headers are recovered from the error itself.
|
|
64
64
|
*/
|
|
65
65
|
getResponseHeaders?: () => HeadersLike;
|
|
66
|
+
/**
|
|
67
|
+
* Provider id of the model being retried. Selects the catalog-declared
|
|
68
|
+
* timezone for a timezone-naive absolute reset stamp (Z.AI/Zhipu report
|
|
69
|
+
* Beijing time), so an over-cap wait is not misread as UTC and discarded.
|
|
70
|
+
*/
|
|
71
|
+
provider?: string;
|
|
66
72
|
/** Observability hook. Fires immediately before sleeping. */
|
|
67
73
|
onRetry?: (info: OneshotRetryInfo) => void;
|
|
68
74
|
}
|
|
@@ -74,6 +74,33 @@ export interface RequestBody {
|
|
|
74
74
|
* explicit option; normal inference defaults to the full Responses contract.
|
|
75
75
|
*/
|
|
76
76
|
export declare function resolveCodexResponsesLite(requested: boolean | undefined): boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Repair both halves of unpaired tool exchanges so the Responses input grammar
|
|
79
|
+
* stays valid — the API rejects either orphan with a 400:
|
|
80
|
+
*
|
|
81
|
+
* - `function_call_output` / `custom_tool_call_output` with no matching call →
|
|
82
|
+
* folded into an assistant message (`400 No tool call found for … output`).
|
|
83
|
+
* Regression of #472 / #1351.
|
|
84
|
+
* - `function_call` / `custom_tool_call` with no matching `*_output` → a
|
|
85
|
+
* placeholder output is synthesized immediately after the call
|
|
86
|
+
* (`400 No tool output found for function call …`). Hit when the user
|
|
87
|
+
* branches/navigates the session tree to a node that ends on a tool call (the
|
|
88
|
+
* tool-result child is dropped from the reconstructed history) or when a turn
|
|
89
|
+
* is aborted/crashes after the call streamed but before its result persisted.
|
|
90
|
+
*/
|
|
91
|
+
/**
|
|
92
|
+
* Sanitize an OpenAI Responses/Codex tool call ID to <= 64 characters and valid charset.
|
|
93
|
+
* Composite IDs with '|' or '\n' have their secondary/item part stripped.
|
|
94
|
+
* Hashing is anchored on the canonical base part so assistant and result composites
|
|
95
|
+
* with different item halves stay identical. Short lossy changes include a hash suffix
|
|
96
|
+
* to preserve collision resistance across distinct IDs.
|
|
97
|
+
*/
|
|
98
|
+
export declare function sanitizeCodexCallId(rawCallId: string): string;
|
|
99
|
+
/**
|
|
100
|
+
* In-place mutates the `call_id` property on every input item in the array to conform
|
|
101
|
+
* to the OpenAI Responses/Codex 64-character limit and valid charset constraints.
|
|
102
|
+
*/
|
|
103
|
+
export declare function sanitizeInputCallIds(input: InputItem[]): void;
|
|
77
104
|
/**
|
|
78
105
|
* Structural view of a Responses-style body mutated by the Lite rewrite.
|
|
79
106
|
* Loose (`unknown`) property types let the turn transformer (`RequestBody`)
|
|
@@ -6,7 +6,7 @@ import { kStreamingLastParseLen, kStreamingPartialJson } from "../utils/block-sy
|
|
|
6
6
|
import type { AssistantMessageEventStream } from "../utils/event-stream.js";
|
|
7
7
|
import type { CapturedHttpErrorResponse } from "../utils/http-inspector.js";
|
|
8
8
|
import type { ChatCompletionCreateParamsStreaming } from "./openai-chat-wire.js";
|
|
9
|
-
import type
|
|
9
|
+
import { type InputItem } from "./openai-codex/request-transformer.js";
|
|
10
10
|
import type { ResponseComputerToolCall, ResponseContentPartAddedEvent, ResponseCreateParamsStreaming, ResponseInput, ResponseInputContent, ResponseInputItem, ResponseOutputItem, ResponseOutputMessage, ResponseReasoningItem, ResponseStatus, ResponseStreamEvent } from "./openai-responses-wire.js";
|
|
11
11
|
/**
|
|
12
12
|
* Keyless-provider sentinel. Custom providers configured with `auth: none`
|
|
@@ -222,6 +222,21 @@ export interface OpenAIExtraBodyOptions {
|
|
|
222
222
|
export declare function applyOpenAIExtraBody<P extends object>(params: P & {
|
|
223
223
|
venice_parameters?: Record<string, unknown>;
|
|
224
224
|
}, extraBody: Record<string, unknown> | undefined, options?: OpenAIExtraBodyOptions): void;
|
|
225
|
+
/**
|
|
226
|
+
* Normalize `content: null` to `[]` in place across a list of inbound wire
|
|
227
|
+
* message items.
|
|
228
|
+
*
|
|
229
|
+
* Codex (and other OpenAI clients) emit `content: null` on empty message items
|
|
230
|
+
* during multi-turn/tool turns; OpenAI tolerates it. Normalizing before the
|
|
231
|
+
* auth-gateway's request schema validation lets the item take the same path as
|
|
232
|
+
* an explicit empty content array — for both validation and any native
|
|
233
|
+
* history-replay clone — instead of 400ing. Shared by the `/v1/responses`
|
|
234
|
+
* (`input[]`) and `/v1/chat/completions` (`messages[]`) routes.
|
|
235
|
+
*
|
|
236
|
+
* `isEligible` lets a route skip items whose content is not array-typed, e.g.
|
|
237
|
+
* the chat `function` role whose content is `string | null`. See issue #10956.
|
|
238
|
+
*/
|
|
239
|
+
export declare function coerceNullMessageContentInPlace(items: unknown, isEligible?: (item: Record<string, unknown>) => boolean): void;
|
|
225
240
|
/**
|
|
226
241
|
* Chat Completions streaming request body shaped by the OpenAI-family providers.
|
|
227
242
|
* (binary `thinking`, Qwen `enable_thinking`/`chat_template_kwargs`, Venice
|
|
@@ -273,7 +288,7 @@ export interface ChatCompletionsReasoningOptions {
|
|
|
273
288
|
thinkingBudgets?: Partial<Record<Effort, number>>;
|
|
274
289
|
}
|
|
275
290
|
export type OpenAICompatEndpoint = "chat-completions" | "responses";
|
|
276
|
-
export type OpenAIReasoningDisableReason = "caller" | "forced-tool-choice" | "tool-choice" | "not-requested";
|
|
291
|
+
export type OpenAIReasoningDisableReason = "caller" | "forced-tool-choice" | "tool-choice" | "tools" | "not-requested";
|
|
277
292
|
export type OpenAICompatPolicyCompat = ResolvedOpenAISharedCompat & Partial<ResolvedOpenAICompat> & Partial<ResolvedOpenAIResponsesCompat>;
|
|
278
293
|
export interface ResolveOpenAICompatPolicyOptions {
|
|
279
294
|
endpoint: OpenAICompatEndpoint;
|
|
@@ -281,6 +296,7 @@ export interface ResolveOpenAICompatPolicyOptions {
|
|
|
281
296
|
reasoning?: string;
|
|
282
297
|
disableReasoning?: boolean;
|
|
283
298
|
toolChoice?: unknown;
|
|
299
|
+
hasTools?: boolean;
|
|
284
300
|
strictResponsesPairing?: boolean;
|
|
285
301
|
includeEncryptedReasoning?: boolean;
|
|
286
302
|
filterReasoningHistory?: boolean;
|
|
@@ -351,6 +367,7 @@ export declare function resolveOpenAICompatPolicy<TApi extends Api>(model: Model
|
|
|
351
367
|
export declare function applyChatCompletionsCompatPolicy(params: OpenAICompletionsParams, policy: OpenAICompatPolicy): void;
|
|
352
368
|
export declare function applyChatCompletionsReasoningParams(params: OpenAICompletionsParams, model: Model<"openai-completions">, compat: ResolvedOpenAICompat, options: (ChatCompletionsReasoningOptions & {
|
|
353
369
|
toolChoice?: unknown;
|
|
370
|
+
hasTools?: boolean;
|
|
354
371
|
}) | undefined): void;
|
|
355
372
|
export declare function disableChatCompletionsReasoningForDialect(params: OpenAICompletionsParams, compat: ResolvedOpenAICompat): void;
|
|
356
373
|
/**
|
|
@@ -550,7 +567,7 @@ type ResponsesToolCallBlock = ToolCall & {
|
|
|
550
567
|
[kStreamingPartialJson]: string;
|
|
551
568
|
[kStreamingLastParseLen]?: number;
|
|
552
569
|
};
|
|
553
|
-
export declare function appendReasoningSummaryPart(item: ResponseReasoningItem, part: ResponseReasoningItem["summary"][number]): void;
|
|
570
|
+
export declare function appendReasoningSummaryPart(item: ResponseReasoningItem, part: ResponseReasoningItem["summary"][number] | undefined): void;
|
|
554
571
|
/**
|
|
555
572
|
* Response-global accumulator for the sequential-cutoff summary contract.
|
|
556
573
|
*
|
|
@@ -1,9 +1,3 @@
|
|
|
1
1
|
import type { OAuthController, OAuthCredentials } from "./types.js";
|
|
2
|
-
/**
|
|
3
|
-
* Login to Perplexity.
|
|
4
|
-
*
|
|
5
|
-
* Tries auto-extraction from the desktop app, then runs HTTP email OTP login.
|
|
6
|
-
*
|
|
7
|
-
* No browser/manual token paste fallback is used.
|
|
8
|
-
*/
|
|
2
|
+
/** Prefer legacy app borrowing, then offer browser SSO when the host supports it. */
|
|
9
3
|
export declare function loginPerplexity(ctrl: OAuthController): Promise<OAuthCredentials>;
|
|
@@ -63,12 +63,20 @@ export interface OAuthProviderInfo {
|
|
|
63
63
|
*/
|
|
64
64
|
storeCredentialsAs?: string;
|
|
65
65
|
}
|
|
66
|
+
/** Sign-in URL and accepted cookies for an isolated, host-owned browser. */
|
|
67
|
+
export type OAuthBrowserSessionRequest = {
|
|
68
|
+
url: string;
|
|
69
|
+
/** Cookie names in preference order; return the first non-empty matching value. */
|
|
70
|
+
cookieNames: readonly string[];
|
|
71
|
+
};
|
|
66
72
|
export interface OAuthController {
|
|
67
73
|
onAuth?(info: OAuthAuthInfo): void;
|
|
68
74
|
onProgress?(message: string): void;
|
|
69
75
|
/** Request pasted callback input; stop any visible prompt when `signal` aborts. */
|
|
70
76
|
onManualCodeInput?(signal?: AbortSignal): Promise<string>;
|
|
71
77
|
onPrompt?(prompt: OAuthPrompt): Promise<string>;
|
|
78
|
+
/** Complete browser login and return one matching cookie value privately. Reject on cancellation or failure. */
|
|
79
|
+
onBrowserSession?(request: OAuthBrowserSessionRequest, signal?: AbortSignal): Promise<string>;
|
|
72
80
|
signal?: AbortSignal;
|
|
73
81
|
fetch?: FetchImpl;
|
|
74
82
|
}
|
package/dist/types/stream.d.ts
CHANGED
|
@@ -17,6 +17,8 @@ export declare const __providerInFlightForTesting: {
|
|
|
17
17
|
setHeartbeatWriter(writer: ((writeProviderInFlightInfo: () => Promise<void>) => Promise<void>) | undefined): void;
|
|
18
18
|
setLeaseRemover(remover: ((leasePath: string) => Promise<void>) | undefined): void;
|
|
19
19
|
setWaitObserver(observer: ((provider: string) => void) | undefined): void;
|
|
20
|
+
setLockCreatedObserver(observer: ((lockDir: string) => Promise<void>) | undefined): void;
|
|
21
|
+
setLockIdentifiedObserver(observer: ((lockDir: string) => Promise<void>) | undefined): void;
|
|
20
22
|
providerDir(provider: string): string;
|
|
21
23
|
lockDir(provider: string): string;
|
|
22
24
|
captureStaleLockRelease(provider: string): Promise<(() => Promise<void>) | null>;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -853,6 +853,8 @@ export interface AssistantMessage {
|
|
|
853
853
|
errorMessage?: string;
|
|
854
854
|
/** Stable recovery-classification text when errorMessage includes display-only diagnostics. */
|
|
855
855
|
errorClassificationMessage?: string;
|
|
856
|
+
/** True only when an exact request-body-read timeout failed on a full Responses replay, not a previous-response delta. */
|
|
857
|
+
requestBodyReadTimeoutFullReplay?: boolean;
|
|
856
858
|
/** Per-tool abort messages used when an aborted assistant turn needs different placeholder results per tool call. */
|
|
857
859
|
toolCallAbortMessages?: Record<string, string>;
|
|
858
860
|
/** HTTP status surfaced by the provider when the request failed. Populated by every provider's catch block alongside `errorMessage` so consumers (auth retry, telemetry, UI) can branch without regex-scraping the message. */
|
|
@@ -973,7 +975,7 @@ export interface CursorTodoSnapshot {
|
|
|
973
975
|
* provider persists this value verbatim. When no handler is registered at all,
|
|
974
976
|
* the provider falls back to its own summary-only result.
|
|
975
977
|
*/
|
|
976
|
-
export type CursorTodoSyncHandler = (snapshot: CursorTodoSnapshot | null, toolCallId: string, error: string | null) => ToolResultMessage;
|
|
978
|
+
export type CursorTodoSyncHandler = (snapshot: CursorTodoSnapshot | null, toolCallId: string, error: string | null, origin?: "read" | "update") => ToolResultMessage;
|
|
977
979
|
export interface CursorShellStreamCallbacks {
|
|
978
980
|
onStdout(data: string): void;
|
|
979
981
|
onStderr(data: string): void;
|
package/dist/types/usage.d.ts
CHANGED
|
@@ -43,6 +43,8 @@ export interface UsageScope {
|
|
|
43
43
|
tier?: string;
|
|
44
44
|
windowId?: string;
|
|
45
45
|
shared?: boolean;
|
|
46
|
+
/** Stable identity shared by routing-specific copies of one upstream quota. */
|
|
47
|
+
sharedGroup?: string;
|
|
46
48
|
}
|
|
47
49
|
/** Normalized limit entry for a single window or quota bucket. */
|
|
48
50
|
export interface UsageLimit {
|
|
@@ -241,6 +243,7 @@ export declare const usageScopeSchema: import("@oh-my-pi/omptype").FluentType<{
|
|
|
241
243
|
projectId?: string | undefined;
|
|
242
244
|
provider: string;
|
|
243
245
|
shared?: boolean | undefined;
|
|
246
|
+
sharedGroup?: string | undefined;
|
|
244
247
|
tier?: string | undefined;
|
|
245
248
|
windowId?: string | undefined;
|
|
246
249
|
}, {
|
|
@@ -250,6 +253,7 @@ export declare const usageScopeSchema: import("@oh-my-pi/omptype").FluentType<{
|
|
|
250
253
|
projectId?: string | undefined;
|
|
251
254
|
provider: string;
|
|
252
255
|
shared?: boolean | undefined;
|
|
256
|
+
sharedGroup?: string | undefined;
|
|
253
257
|
tier?: string | undefined;
|
|
254
258
|
windowId?: string | undefined;
|
|
255
259
|
}>;
|
|
@@ -272,6 +276,7 @@ export declare const usageLimitSchema: import("@oh-my-pi/omptype").FluentType<{
|
|
|
272
276
|
projectId?: string | undefined;
|
|
273
277
|
provider: string;
|
|
274
278
|
shared?: boolean | undefined;
|
|
279
|
+
sharedGroup?: string | undefined;
|
|
275
280
|
tier?: string | undefined;
|
|
276
281
|
windowId?: string | undefined;
|
|
277
282
|
};
|
|
@@ -302,6 +307,7 @@ export declare const usageLimitSchema: import("@oh-my-pi/omptype").FluentType<{
|
|
|
302
307
|
projectId?: string | undefined;
|
|
303
308
|
provider: string;
|
|
304
309
|
shared?: boolean | undefined;
|
|
310
|
+
sharedGroup?: string | undefined;
|
|
305
311
|
tier?: string | undefined;
|
|
306
312
|
windowId?: string | undefined;
|
|
307
313
|
};
|
|
@@ -359,6 +365,7 @@ export declare const usageReportSchema: import("@oh-my-pi/omptype").FluentType<{
|
|
|
359
365
|
projectId?: string | undefined;
|
|
360
366
|
provider: string;
|
|
361
367
|
shared?: boolean | undefined;
|
|
368
|
+
sharedGroup?: string | undefined;
|
|
362
369
|
tier?: string | undefined;
|
|
363
370
|
windowId?: string | undefined;
|
|
364
371
|
};
|
|
@@ -404,6 +411,7 @@ export declare const usageReportSchema: import("@oh-my-pi/omptype").FluentType<{
|
|
|
404
411
|
projectId?: string | undefined;
|
|
405
412
|
provider: string;
|
|
406
413
|
shared?: boolean | undefined;
|
|
414
|
+
sharedGroup?: string | undefined;
|
|
407
415
|
tier?: string | undefined;
|
|
408
416
|
windowId?: string | undefined;
|
|
409
417
|
};
|
|
@@ -113,3 +113,39 @@ export type SyntheticUserCarrier = object & {
|
|
|
113
113
|
};
|
|
114
114
|
/** True for `user` messages synthesized by message transformation. */
|
|
115
115
|
export declare function isSyntheticUser(message: SyntheticUserCarrier | null | undefined): boolean;
|
|
116
|
+
/**
|
|
117
|
+
* Marks a message synthesized by a per-call context transform rather than
|
|
118
|
+
* loaded from persisted conversation history.
|
|
119
|
+
*
|
|
120
|
+
* Prompt-cache boundaries must skip these messages: their content is rebuilt
|
|
121
|
+
* for each request and cannot anchor a prefix reused by the next turn.
|
|
122
|
+
* Symbol-keyed so the marker never persists or reaches the provider wire.
|
|
123
|
+
*/
|
|
124
|
+
export declare const kPerCallContextMessage: unique symbol;
|
|
125
|
+
/** Carries per-call context provenance without exposing a string-keyed property. */
|
|
126
|
+
export type PerCallContextMessageCarrier = object & {
|
|
127
|
+
[kPerCallContextMessage]?: true;
|
|
128
|
+
};
|
|
129
|
+
/** Marks a message as synthesized for the current provider call. */
|
|
130
|
+
export declare function markPerCallContextMessage(message: PerCallContextMessageCarrier): void;
|
|
131
|
+
/** Copies per-call context provenance to a converted or projected message. */
|
|
132
|
+
export declare function copyPerCallContextMessage(target: PerCallContextMessageCarrier, source: PerCallContextMessageCarrier): void;
|
|
133
|
+
/** True when a message was synthesized for the current provider call. */
|
|
134
|
+
export declare function isPerCallContextMessage(message: PerCallContextMessageCarrier | null | undefined): boolean;
|
|
135
|
+
/**
|
|
136
|
+
* Original history position carried by a context message clone.
|
|
137
|
+
*
|
|
138
|
+
* Object-spread transforms retain this symbol, allowing the extension runner
|
|
139
|
+
* to distinguish byte-identical historical copies from inserted messages.
|
|
140
|
+
*/
|
|
141
|
+
export declare const kContextHistoryIndex: unique symbol;
|
|
142
|
+
/** Carries a context message's original history position. */
|
|
143
|
+
export type ContextHistoryIndexCarrier = object & {
|
|
144
|
+
[kContextHistoryIndex]?: number;
|
|
145
|
+
};
|
|
146
|
+
/** Reads a context message's original history position. */
|
|
147
|
+
export declare function getContextHistoryIndex(message: ContextHistoryIndexCarrier | null | undefined): number | undefined;
|
|
148
|
+
/** Records a context message's original history position. */
|
|
149
|
+
export declare function setContextHistoryIndex(message: ContextHistoryIndexCarrier, index: number): void;
|
|
150
|
+
/** Removes context-history tracking before provider conversion. */
|
|
151
|
+
export declare function clearContextHistoryIndex(message: ContextHistoryIndexCarrier): void;
|
|
@@ -26,6 +26,8 @@ export interface OpenAIStreamRequestInit {
|
|
|
26
26
|
body: unknown;
|
|
27
27
|
signal: AbortSignal;
|
|
28
28
|
fetch?: FetchImpl;
|
|
29
|
+
/** Optional caller-specific gate composed with shared transport retry exclusions. */
|
|
30
|
+
shouldRetryResponse?: (response: Response, bodyText: string) => boolean | Promise<boolean>;
|
|
29
31
|
/** Raw wire-frame observer (`onSseEvent` debug pipeline). */
|
|
30
32
|
onSseEvent?: SseEventObserver;
|
|
31
33
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export type HeadersLike = Headers | Record<string, string | undefined> | undefined | null;
|
|
2
|
+
/** Extracts retry timing using the provider's catalog-declared timestamp timezone. */
|
|
3
|
+
export declare function extractProviderRetryHint(provider: string | undefined, message: string | undefined): number | undefined;
|
|
2
4
|
export declare function formatErrorMessageWithRetryAfter(error: unknown, headers?: HeadersLike): string;
|
|
3
5
|
export declare function getRetryAfterMsFromHeaders(headers: HeadersLike): number | undefined;
|
|
4
6
|
export declare function getHeadersFromError(error: unknown): HeadersLike;
|
|
@@ -41,10 +41,9 @@ export declare function arkToWireSchema(schema: Type): Record<string, unknown>;
|
|
|
41
41
|
export declare function toolWireSchema(tool: Tool): Record<string, unknown>;
|
|
42
42
|
/**
|
|
43
43
|
* Return a deep clone of `schema` with every `description` annotation removed.
|
|
44
|
-
* The result is memoized
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
* system-prompt/UI rendering.
|
|
44
|
+
* The result is memoized against the input (`stamp`) so repeated provider
|
|
45
|
+
* requests reuse the same stripped object; the input is never mutated, so the
|
|
46
|
+
* memoized `toolWireSchema` result stays intact for system-prompt/UI rendering.
|
|
48
47
|
*/
|
|
49
48
|
export declare function stripSchemaDescriptions(schema: Record<string, unknown>): Record<string, unknown>;
|
|
50
49
|
/**
|
|
@@ -53,6 +52,6 @@ export declare function stripSchemaDescriptions(schema: Record<string, unknown>)
|
|
|
53
52
|
* Used when the full tool catalog is rendered into the system prompt instead, so
|
|
54
53
|
* the descriptions ride the wire once (in the prompt) rather than duplicated on
|
|
55
54
|
* every tool definition. Parameters are resolved to wire JSON Schema and cloned,
|
|
56
|
-
* leaving the original tool objects and the
|
|
55
|
+
* leaving the original tool objects and the memoized schema cache untouched.
|
|
57
56
|
*/
|
|
58
57
|
export declare function stripToolDescriptions(tools: readonly Tool[]): Tool[];
|
package/dist/types/utils.d.ts
CHANGED
|
@@ -48,6 +48,15 @@ export declare function stripUnpairedOpenAIResponsesComputerReasoningIdsForRepla
|
|
|
48
48
|
* Returns `undefined` for hidden-empty turns that only contain reasoning and an
|
|
49
49
|
* empty assistant message, allowing callers to rebuild visible transcript
|
|
50
50
|
* history instead of replaying stale native state.
|
|
51
|
+
*
|
|
52
|
+
* When the turn does carry replayable output, whitespace-only assistant
|
|
53
|
+
* messages are dropped rather than replayed. gpt-5.6 Codex ends a turn whose
|
|
54
|
+
* text all landed in the `commentary` phase with an empty `final_answer`
|
|
55
|
+
* message; replaying that item verbatim seeds the next turn with an empty slot
|
|
56
|
+
* the model then fills - `""` → `"\n\n"` → stray words → non-Latin residue -
|
|
57
|
+
* and each contaminated item is replayed in turn, so the drift compounds until
|
|
58
|
+
* the visible answer collapses. Codex CLI replays the empty item too
|
|
59
|
+
* (openai/codex#32389); this is the layer where omp can refuse to.
|
|
51
60
|
*/
|
|
52
61
|
export declare function sanitizeOpenAIResponsesAssistantHistoryItemsForReplay(items: Array<Record<string, unknown>>, options?: OpenAIResponsesReplaySanitizeOptions): ResponseInput | undefined;
|
|
53
62
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oh-my-pi/pi-ai",
|
|
3
|
-
"version": "18.2.
|
|
3
|
+
"version": "18.2.1",
|
|
4
4
|
"description": "Unified LLM API with automatic model discovery and provider configuration",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -124,11 +124,11 @@
|
|
|
124
124
|
"fmt": "oxfmt --no-error-on-unmatched-pattern 'src/**/*.{ts,tsx}' '{test,bench,examples,scripts}/**/*.ts' '*.ts'"
|
|
125
125
|
},
|
|
126
126
|
"dependencies": {
|
|
127
|
-
"@oh-my-pi/omptype": "18.2.
|
|
128
|
-
"@oh-my-pi/pi-catalog": "18.2.
|
|
129
|
-
"@oh-my-pi/pi-natives": "18.2.
|
|
130
|
-
"@oh-my-pi/pi-utils": "18.2.
|
|
131
|
-
"@oh-my-pi/pi-wire": "18.2.
|
|
127
|
+
"@oh-my-pi/omptype": "18.2.1",
|
|
128
|
+
"@oh-my-pi/pi-catalog": "18.2.1",
|
|
129
|
+
"@oh-my-pi/pi-natives": "18.2.1",
|
|
130
|
+
"@oh-my-pi/pi-utils": "18.2.1",
|
|
131
|
+
"@oh-my-pi/pi-wire": "18.2.1"
|
|
132
132
|
},
|
|
133
133
|
"devDependencies": {
|
|
134
134
|
"@types/bun": "^1.3.14"
|