@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.
@@ -2489,12 +2489,16 @@ async function convertToOpenAIResponsesInput({
2489
2489
  store,
2490
2490
  hasLocalShellTool = false,
2491
2491
  hasShellTool = false,
2492
- hasApplyPatchTool = false
2492
+ hasApplyPatchTool = false,
2493
+ compactionInput
2493
2494
  }) {
2494
2495
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
2495
2496
  const input = [];
2496
2497
  const warnings = [];
2497
2498
  const processedApprovalIds = /* @__PURE__ */ new Set();
2499
+ if (compactionInput && compactionInput.length > 0) {
2500
+ input.push(...compactionInput);
2501
+ }
2498
2502
  for (const { role, content } of prompt) {
2499
2503
  switch (role) {
2500
2504
  case "system": {
@@ -3788,7 +3792,18 @@ var openaiResponsesProviderOptionsSchema = lazySchema15(
3788
3792
  * When enabled, the SDK applies reasoning-model parameter compatibility rules
3789
3793
  * and defaults `systemMessageMode` to `developer` unless overridden.
3790
3794
  */
3791
- forceReasoning: z17.boolean().optional()
3795
+ forceReasoning: z17.boolean().optional(),
3796
+ /**
3797
+ * Compaction input items to inject into the request.
3798
+ * These are standalone items from the /responses/compact endpoint that contain
3799
+ * encrypted conversation history for context window management.
3800
+ */
3801
+ compactionInput: z17.array(
3802
+ z17.object({
3803
+ type: z17.literal("compaction"),
3804
+ encrypted_content: z17.string()
3805
+ })
3806
+ ).optional()
3792
3807
  })
3793
3808
  )
3794
3809
  );
@@ -4399,7 +4414,8 @@ var OpenAIResponsesLanguageModel = class {
4399
4414
  store: (_c = openaiOptions == null ? void 0 : openaiOptions.store) != null ? _c : true,
4400
4415
  hasLocalShellTool: hasOpenAITool("openai.local_shell"),
4401
4416
  hasShellTool: hasOpenAITool("openai.shell"),
4402
- hasApplyPatchTool: hasOpenAITool("openai.apply_patch")
4417
+ hasApplyPatchTool: hasOpenAITool("openai.apply_patch"),
4418
+ compactionInput: openaiOptions == null ? void 0 : openaiOptions.compactionInput
4403
4419
  });
4404
4420
  warnings.push(...inputWarnings);
4405
4421
  const strictJsonSchema = (_d = openaiOptions == null ? void 0 : openaiOptions.strictJsonSchema) != null ? _d : true;