pi-openai-toolkit 0.4.0 → 0.4.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 CHANGED
@@ -20,7 +20,7 @@
20
20
  ### Install the published package globally (recommended)
21
21
 
22
22
  ```bash
23
- pi install npm:pi-openai-toolkit@0.3.0
23
+ pi install npm:pi-openai-toolkit
24
24
  ```
25
25
 
26
26
  This adds the package to Pi's global settings. Verify the installation with:
@@ -32,7 +32,7 @@ pi list
32
32
  To install it only for the current project, use:
33
33
 
34
34
  ```bash
35
- pi install npm:pi-openai-toolkit@0.3.0 --local
35
+ pi install npm:pi-openai-toolkit --local
36
36
  ```
37
37
 
38
38
  ### Git installation (alternative / development)
package/README_zh.md CHANGED
@@ -20,7 +20,7 @@
20
20
  ### 全局安装已发布版本(推荐)
21
21
 
22
22
  ```bash
23
- pi install npm:pi-openai-toolkit@0.3.0
23
+ pi install npm:pi-openai-toolkit
24
24
  ```
25
25
 
26
26
  该命令会把工具包加入 Pi 的全局配置。可以使用以下命令确认安装成功:
@@ -32,7 +32,7 @@ pi list
32
32
  如果只想安装到当前项目,使用:
33
33
 
34
34
  ```bash
35
- pi install npm:pi-openai-toolkit@0.3.0 --local
35
+ pi install npm:pi-openai-toolkit --local
36
36
  ```
37
37
 
38
38
  ### Git 安装(替代 / 开发路径)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-openai-toolkit",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "OpenAI-focused Pi toolkit providing remote Responses compaction and native Web Search.",
@@ -101,9 +101,6 @@ async function runResponsesNativeCompact(
101
101
  const instructions = buildCompactionInstructions(ctx.getSystemPrompt(), event.customInstructions);
102
102
  const branchEntries = ctx.sessionManager.getBranch();
103
103
  const latestNativeCompaction = resolveLatestNativeCompactionEntry(branchEntries, {
104
- provider: consumer.provider,
105
- api: consumer.api,
106
- model: consumer.model,
107
104
  baseUrl: consumer.baseUrl,
108
105
  });
109
106
 
@@ -460,9 +457,6 @@ async function handleBeforeProviderRequest(event: BeforeProviderRequestEvent, ct
460
457
 
461
458
  const branchEntries = ctx.sessionManager.getBranch();
462
459
  const latestNativeCompaction = resolveLatestNativeCompactionEntry(branchEntries, {
463
- provider: runtime.provider,
464
- api: runtime.api,
465
- model: runtime.model,
466
460
  baseUrl: runtime.baseUrl,
467
461
  });
468
462
  if (!latestNativeCompaction.ok) {
package/src/runtime.ts CHANGED
@@ -27,8 +27,6 @@ export type NativeCompactionFailureReason =
27
27
  | "auth-resolution-failed"
28
28
  | "unsupported-payload"
29
29
  | "payload-model-mismatch"
30
- | "provider-mismatch"
31
- | "api-mismatch"
32
30
  | "base-url-mismatch";
33
31
 
34
32
  export type NativeCompactionSupportOptions = {
@@ -392,28 +390,6 @@ export async function resolveRemoteCompactionExecution(
392
390
 
393
391
  const consumer = consumerResolution.runtime;
394
392
  const compactor = compactorResolution.runtime;
395
- if (compactor.provider !== consumer.provider) {
396
- return {
397
- ok: false,
398
- reason: "provider-mismatch",
399
- provider: compactor.provider,
400
- api: compactor.api,
401
- model: compactor.model,
402
- baseUrl: compactor.baseUrl,
403
- modelSpec: spec,
404
- };
405
- }
406
- if (compactor.api !== consumer.api) {
407
- return {
408
- ok: false,
409
- reason: "api-mismatch",
410
- provider: compactor.provider,
411
- api: compactor.api,
412
- model: compactor.model,
413
- baseUrl: compactor.baseUrl,
414
- modelSpec: spec,
415
- };
416
- }
417
393
  if (compactor.baseUrl !== consumer.baseUrl) {
418
394
  return {
419
395
  ok: false,