@zenmux/rosetta-ai 1.0.12 → 1.0.13
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.
|
@@ -135,8 +135,10 @@ class ResponsesToChatCompletionConverter {
|
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
|
-
// Message
|
|
139
|
-
|
|
138
|
+
// Message — legacy emitted the message item only when content was truthy
|
|
139
|
+
// (empty-string content with e.g. max_output_tokens exhausted was skipped).
|
|
140
|
+
// Refusal is also surfaced as a message when present.
|
|
141
|
+
if (msg?.content || msg?.refusal) {
|
|
140
142
|
const content = [];
|
|
141
143
|
if (msg.refusal) {
|
|
142
144
|
content.push({ type: "refusal", refusal: msg.refusal });
|
|
@@ -290,7 +292,7 @@ class ResponsesToChatCompletionConverter {
|
|
|
290
292
|
properties: t.parameters.properties ?? {},
|
|
291
293
|
required: t.parameters.required ?? [],
|
|
292
294
|
},
|
|
293
|
-
strict: t.strict,
|
|
295
|
+
strict: t.strict ?? true,
|
|
294
296
|
};
|
|
295
297
|
}
|
|
296
298
|
if (t.type === "web_search" ||
|