@ai-sdk/openai 4.0.41 → 4.0.42
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/CHANGELOG.md +6 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/dist/internal/index.d.ts +4 -1
- package/dist/internal/index.js +8 -0
- package/dist/internal/index.js.map +1 -1
- package/docs/03-openai.mdx +35 -0
- package/package.json +3 -3
- package/src/responses/openai-responses-api.ts +6 -1
- package/src/responses/openai-responses-language-model-options.ts +6 -0
- package/src/responses/openai-responses-language-model.ts +7 -0
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1379,6 +1379,7 @@ declare const openaiLanguageModelResponsesOptionsSchema: _ai_sdk_provider_utils.
|
|
|
1379
1379
|
type: "compaction";
|
|
1380
1380
|
compactThreshold: number;
|
|
1381
1381
|
}[] | null | undefined;
|
|
1382
|
+
compactionTrigger?: boolean | undefined;
|
|
1382
1383
|
allowedTools?: {
|
|
1383
1384
|
toolNames: string[];
|
|
1384
1385
|
mode?: "auto" | "required" | undefined;
|
package/dist/index.js
CHANGED
|
@@ -5609,6 +5609,11 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema25(
|
|
|
5609
5609
|
compactThreshold: z27.number()
|
|
5610
5610
|
})
|
|
5611
5611
|
).nullish(),
|
|
5612
|
+
/**
|
|
5613
|
+
* Request explicit server-side compaction by appending a
|
|
5614
|
+
* `compaction_trigger` item to the Responses input.
|
|
5615
|
+
*/
|
|
5616
|
+
compactionTrigger: z27.boolean().optional(),
|
|
5612
5617
|
/**
|
|
5613
5618
|
* Restrict the callable tools to a subset while keeping the full tools
|
|
5614
5619
|
* list intact, so prompt caching is preserved across requests with
|
|
@@ -6192,6 +6197,9 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
6192
6197
|
outputSchemaToolNames: outputSchemaToolNames.size > 0 ? outputSchemaToolNames : void 0
|
|
6193
6198
|
});
|
|
6194
6199
|
warnings.push(...inputWarnings);
|
|
6200
|
+
if (openaiOptions == null ? void 0 : openaiOptions.compactionTrigger) {
|
|
6201
|
+
input.push({ type: "compaction_trigger" });
|
|
6202
|
+
}
|
|
6195
6203
|
const strictJsonSchema = (_g = openaiOptions == null ? void 0 : openaiOptions.strictJsonSchema) != null ? _g : true;
|
|
6196
6204
|
let include = openaiOptions == null ? void 0 : openaiOptions.include;
|
|
6197
6205
|
function addInclude(key) {
|
|
@@ -10023,7 +10031,7 @@ var OpenAISkills = class {
|
|
|
10023
10031
|
};
|
|
10024
10032
|
|
|
10025
10033
|
// src/version.ts
|
|
10026
|
-
var VERSION = true ? "4.0.
|
|
10034
|
+
var VERSION = true ? "4.0.42" : "0.0.0-test";
|
|
10027
10035
|
|
|
10028
10036
|
// src/openai-provider.ts
|
|
10029
10037
|
function createOpenAI(options = {}) {
|