@zenning/openai 3.0.5 → 3.0.7

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.
@@ -2468,12 +2468,16 @@ async function convertToOpenAIResponsesInput({
2468
2468
  store,
2469
2469
  hasLocalShellTool = false,
2470
2470
  hasShellTool = false,
2471
- hasApplyPatchTool = false
2471
+ hasApplyPatchTool = false,
2472
+ compactionInput
2472
2473
  }) {
2473
2474
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
2474
2475
  const input = [];
2475
2476
  const warnings = [];
2476
2477
  const processedApprovalIds = /* @__PURE__ */ new Set();
2478
+ if (compactionInput && compactionInput.length > 0) {
2479
+ input.push(...compactionInput);
2480
+ }
2477
2481
  for (const { role, content } of prompt) {
2478
2482
  switch (role) {
2479
2483
  case "system": {
@@ -3767,7 +3771,18 @@ var openaiResponsesProviderOptionsSchema = (0, import_provider_utils24.lazySchem
3767
3771
  * When enabled, the SDK applies reasoning-model parameter compatibility rules
3768
3772
  * and defaults `systemMessageMode` to `developer` unless overridden.
3769
3773
  */
3770
- forceReasoning: import_v417.z.boolean().optional()
3774
+ forceReasoning: import_v417.z.boolean().optional(),
3775
+ /**
3776
+ * Compaction input items to inject into the request.
3777
+ * These are standalone items from the /responses/compact endpoint that contain
3778
+ * encrypted conversation history for context window management.
3779
+ */
3780
+ compactionInput: import_v417.z.array(
3781
+ import_v417.z.object({
3782
+ type: import_v417.z.literal("compaction"),
3783
+ encrypted_content: import_v417.z.string()
3784
+ })
3785
+ ).optional()
3771
3786
  })
3772
3787
  )
3773
3788
  );
@@ -4352,7 +4367,8 @@ var OpenAIResponsesLanguageModel = class {
4352
4367
  store: (_c = openaiOptions == null ? void 0 : openaiOptions.store) != null ? _c : true,
4353
4368
  hasLocalShellTool: hasOpenAITool("openai.local_shell"),
4354
4369
  hasShellTool: hasOpenAITool("openai.shell"),
4355
- hasApplyPatchTool: hasOpenAITool("openai.apply_patch")
4370
+ hasApplyPatchTool: hasOpenAITool("openai.apply_patch"),
4371
+ compactionInput: openaiOptions == null ? void 0 : openaiOptions.compactionInput
4356
4372
  });
4357
4373
  warnings.push(...inputWarnings);
4358
4374
  const strictJsonSchema = (_d = openaiOptions == null ? void 0 : openaiOptions.strictJsonSchema) != null ? _d : true;