2
0

@ai-sdk%[email protected] 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. diff --git a/dist/index.js b/dist/index.js
  2. index 1c78d6f13..21254c8ca 100644
  3. --- a/dist/index.js
  4. +++ b/dist/index.js
  5. @@ -4236,6 +4236,12 @@ var openaiLanguageModelResponsesOptionsSchema = (0, import_provider_utils27.lazy
  6. * Additional metadata to store with the generation.
  7. */
  8. metadata: import_v422.z.any().nullish(),
  9. + contextManagement: import_v422.z.array(
  10. + import_v422.z.object({
  11. + type: import_v422.z.literal("compaction"),
  12. + compactThreshold: import_v422.z.number()
  13. + })
  14. + ).nullish(),
  15. /**
  16. * Whether to use parallel tool calls. Defaults to `true`.
  17. */
  18. @@ -4790,6 +4796,12 @@ var OpenAIResponsesLanguageModel = class {
  19. metadata: openaiOptions == null ? void 0 : openaiOptions.metadata,
  20. parallel_tool_calls: openaiOptions == null ? void 0 : openaiOptions.parallelToolCalls,
  21. previous_response_id: openaiOptions == null ? void 0 : openaiOptions.previousResponseId,
  22. + ...(openaiOptions != null && openaiOptions.contextManagement && {
  23. + context_management: openaiOptions.contextManagement.map((cm) => ({
  24. + type: cm.type,
  25. + compact_threshold: cm.compactThreshold
  26. + }))
  27. + }),
  28. store,
  29. user: openaiOptions == null ? void 0 : openaiOptions.user,
  30. instructions: openaiOptions == null ? void 0 : openaiOptions.instructions,
  31. @@ -6759,4 +6771,4 @@ var openai = createOpenAI();
  32. createOpenAI,
  33. openai
  34. });
  35. -//# sourceMappingURL=index.js.map
  36. \ No newline at end of file
  37. +//# sourceMappingURL=index.js.map
  38. diff --git a/dist/index.mjs b/dist/index.mjs
  39. index 3dee8855a..3a0081631 100644
  40. --- a/dist/index.mjs
  41. +++ b/dist/index.mjs
  42. @@ -4313,6 +4313,12 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema20(
  43. * Additional metadata to store with the generation.
  44. */
  45. metadata: z22.any().nullish(),
  46. + contextManagement: z22.array(
  47. + z22.object({
  48. + type: z22.literal("compaction"),
  49. + compactThreshold: z22.number()
  50. + })
  51. + ).nullish(),
  52. /**
  53. * Whether to use parallel tool calls. Defaults to `true`.
  54. */
  55. @@ -4869,6 +4875,12 @@ var OpenAIResponsesLanguageModel = class {
  56. metadata: openaiOptions == null ? void 0 : openaiOptions.metadata,
  57. parallel_tool_calls: openaiOptions == null ? void 0 : openaiOptions.parallelToolCalls,
  58. previous_response_id: openaiOptions == null ? void 0 : openaiOptions.previousResponseId,
  59. + ...(openaiOptions != null && openaiOptions.contextManagement && {
  60. + context_management: openaiOptions.contextManagement.map((cm) => ({
  61. + type: cm.type,
  62. + compact_threshold: cm.compactThreshold
  63. + }))
  64. + }),
  65. store,
  66. user: openaiOptions == null ? void 0 : openaiOptions.user,
  67. instructions: openaiOptions == null ? void 0 : openaiOptions.instructions,
  68. @@ -6849,4 +6861,4 @@ export {
  69. createOpenAI,
  70. openai
  71. };
  72. -//# sourceMappingURL=index.mjs.map
  73. \ No newline at end of file
  74. +//# sourceMappingURL=index.mjs.map
  75. diff --git a/dist/index.d.ts b/dist/index.d.ts
  76. index 7317931f9..55177ff7b 100644
  77. --- a/dist/index.d.ts
  78. +++ b/dist/index.d.ts
  79. @@ -1014,6 +1014,10 @@ declare const openaiLanguageModelResponsesOptionsSchema: _ai_sdk_provider_utils.
  80. logprobs?: number | boolean | undefined;
  81. maxToolCalls?: number | null | undefined;
  82. metadata?: any;
  83. + contextManagement?: {
  84. + type: "compaction";
  85. + compactThreshold: number;
  86. + }[] | null | undefined;
  87. parallelToolCalls?: boolean | null | undefined;
  88. previousResponseId?: string | null | undefined;
  89. promptCacheKey?: string | null | undefined;
  90. diff --git a/dist/index.d.mts b/dist/index.d.mts
  91. index 7317931f9..55177ff7b 100644
  92. --- a/dist/index.d.mts
  93. +++ b/dist/index.d.mts
  94. @@ -1014,6 +1014,10 @@ declare const openaiLanguageModelResponsesOptionsSchema: _ai_sdk_provider_utils.
  95. logprobs?: number | boolean | undefined;
  96. maxToolCalls?: number | null | undefined;
  97. metadata?: any;
  98. + contextManagement?: {
  99. + type: "compaction";
  100. + compactThreshold: number;
  101. + }[] | null | undefined;
  102. parallelToolCalls?: boolean | null | undefined;
  103. previousResponseId?: string | null | undefined;
  104. promptCacheKey?: string | null | undefined;