pi-openai-toolkit 0.22.0 → 0.22.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/README.md +1 -1
- package/README.zh.md +1 -1
- package/docs/internals.md +2 -2
- package/package.json +1 -1
- package/src/codex-fast/extension.ts +2 -2
package/README.md
CHANGED
|
@@ -62,7 +62,7 @@ Remote windows use alpha endpoints that may change upstream. When switching mode
|
|
|
62
62
|
|
|
63
63
|
## Codex Fast
|
|
64
64
|
|
|
65
|
-
Fast is OFF by default.
|
|
65
|
+
Fast is OFF by default. Run `/fast` in Pi's terminal or a UI-backed RPC client such as pi-web to turn it ON, then run it again to turn it OFF. Notifications confirm changes; the status is `Fast ON`, `Fast OFF`, or `Fast N/A` for an ineligible route, with display placement controlled by the client. Print/JSON and headless commands cannot toggle Fast. No Fast configuration is needed.
|
|
66
66
|
|
|
67
67
|
Supports native Codex and recognizable GPT/Codex models on compatible Responses gateways. The selection is saved only in the current session: reload/resume and `new_context` retain it; new or forked sessions start OFF. ON requests Fast, while OFF requests Standard, overriding an existing service-tier preference on eligible conversation requests without changing reasoning effort or configuration files.
|
|
68
68
|
|
package/README.zh.md
CHANGED
|
@@ -62,7 +62,7 @@ Toolkit 只读取一个全局配置文件,即使扩展安装在项目内也一
|
|
|
62
62
|
|
|
63
63
|
## Codex Fast
|
|
64
64
|
|
|
65
|
-
Fast
|
|
65
|
+
Fast 默认关闭。在 Pi 终端或 pi-web 等支持 UI 的 RPC 客户端中输入 `/fast` 开启,再输入一次关闭。切换结果通过通知确认;状态为 `Fast ON`、`Fast OFF`,不适用的路由为 `Fast N/A`,显示位置由客户端决定。print/JSON 和无 UI 模式不能切换 Fast。无需添加 Fast 配置。
|
|
66
66
|
|
|
67
67
|
支持原生 Codex,以及兼容 Responses 网关中可识别的 GPT/Codex 模型。开关只保存在当前会话:reload、续聊和 `new_context` 保留状态,新建或 fork 的会话默认关闭。开启时请求 Fast,关闭时请求标准档,会覆盖符合条件的对话请求中原有的服务档位,但不改变 reasoning effort 或配置文件。
|
|
68
68
|
|
package/docs/internals.md
CHANGED
|
@@ -29,7 +29,7 @@ Selected invalid policy blocks dependent operations; unrelated model errors rema
|
|
|
29
29
|
|
|
30
30
|
### Codex Fast session control
|
|
31
31
|
|
|
32
|
-
[src/codex-fast/extension.ts](../src/codex-fast/extension.ts) registers the human-only, no-argument `/fast` toggle and an owned `ctx.ui.setStatus()` item. Default OFF requests `service_tier: "default"`; ON requests `"priority"`, the Codex Fast wire value. The status is the local request preference, not verified server acceptance or latency. Fast can increase usage/cost. No config setting, model tool, credential probe, retry, new header, reasoning-effort change or custom footer is added.
|
|
32
|
+
[src/codex-fast/extension.ts](../src/codex-fast/extension.ts) registers the human-only, no-argument `/fast` toggle and an owned `ctx.ui.setStatus()` item. The command accepts UI-backed TUI/RPC (including pi-web) and older UI contexts without `mode`; print/JSON and headless commands cannot toggle. Notifications confirm changes, while status rendering belongs to the client. Default OFF requests `service_tier: "default"`; ON requests `"priority"`, the Codex Fast wire value. The status is the local request preference, not verified server acceptance or latency. Fast can increase usage/cost. No config setting, model tool, credential probe, retry, new header, reasoning-effort change or custom footer is added.
|
|
33
33
|
|
|
34
34
|
Native `openai-codex-responses` routes qualify. Non-official HTTP(S) `openai-responses` gateways qualify for recognizable GPT/Codex IDs or an existing exact Codex gateway identity, including a resolved virtual route. Unknown opaque aliases without that identity, Azure, other APIs and ordinary `api.openai.com` API-key routes remain untouched. A capability marker is not backend entitlement.
|
|
35
35
|
|
|
@@ -37,7 +37,7 @@ Version-1 `pi-openai-toolkit:codex-fast` custom entries contain only the owning
|
|
|
37
37
|
|
|
38
38
|
The payload hook takes one selection snapshot and returns a new object only when a matching ordinary Responses request needs a tier change. Explicit OFF also overrides an existing Fast/Flex tier to Standard. Dedicated compaction shapes and malformed/foreign payloads are left unchanged. Fast loads after Web Search/image registration and before the final Astra effort pass, so its tier does not alter the pre-search cached extras used by separate search/image/compaction clients.
|
|
39
39
|
|
|
40
|
-
Native Pi and Toolkit gateway WebSocket adapters already compare non-input body fields before incremental reuse. A changed `service_tier` invalidates the incompatible `previous_response_id` delta; the existing transport/retry logic is retained. Offline official-Pi fixtures in [test/pi-codex-fast.test.ts](../test/pi-codex-fast.test.ts) cover
|
|
40
|
+
Native Pi and Toolkit gateway WebSocket adapters already compare non-input body fields before incremental reuse. A changed `service_tier` invalidates the incompatible `previous_response_id` delta; the existing transport/retry logic is retained. Offline official-Pi fixtures in [test/pi-codex-fast.test.ts](../test/pi-codex-fast.test.ts) cover TUI/RPC command/status/notifications, actual native/gateway HTTP/WebSocket bodies, saved reopen/reload, fork isolation and continuation transitions. They do not establish live Fast availability.
|
|
41
41
|
|
|
42
42
|
---
|
|
43
43
|
|
package/package.json
CHANGED
|
@@ -72,8 +72,8 @@ export function registerCodexFastExtension(
|
|
|
72
72
|
pi.registerCommand("fast", {
|
|
73
73
|
description: "Toggle Codex Fast for this session (default OFF; may increase usage/cost).",
|
|
74
74
|
handler: async (args, ctx) => {
|
|
75
|
-
if (!ctx.hasUI || (ctx.mode !== undefined && ctx.mode !== "tui")) {
|
|
76
|
-
notify(ctx, "/fast requires an interactive terminal.", "warning");
|
|
75
|
+
if (!ctx.hasUI || (ctx.mode !== undefined && ctx.mode !== "tui" && ctx.mode !== "rpc")) {
|
|
76
|
+
notify(ctx, "/fast requires an interactive UI (terminal or RPC).", "warning");
|
|
77
77
|
return;
|
|
78
78
|
}
|
|
79
79
|
if (args.trim()) { notify(ctx, "Usage: /fast (toggle ON/OFF)", "warning"); return; }
|