@zenmux/rosetta-ai 1.0.9 → 1.0.11
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.
|
@@ -369,7 +369,7 @@ class ResponsesToChatCompletionConverter {
|
|
|
369
369
|
if (!state.current || state.current.type !== "reasoning") {
|
|
370
370
|
// Close any other open item before starting reasoning.
|
|
371
371
|
events.push(...this.closeCurrent());
|
|
372
|
-
const itemId = `rs_${
|
|
372
|
+
const itemId = `rs_${state.id}`;
|
|
373
373
|
state.current = {
|
|
374
374
|
type: "reasoning",
|
|
375
375
|
itemId,
|
|
@@ -433,7 +433,7 @@ class ResponsesToChatCompletionConverter {
|
|
|
433
433
|
// matching the legacy converter's output_index math.
|
|
434
434
|
const outputIndex = state.outputIndex + state.toolCallCount - 1;
|
|
435
435
|
if (isCustom) {
|
|
436
|
-
const itemId = `ct_${
|
|
436
|
+
const itemId = `ct_${state.id}`;
|
|
437
437
|
state.current = {
|
|
438
438
|
type: "custom_tool_call",
|
|
439
439
|
itemId,
|
|
@@ -457,7 +457,7 @@ class ResponsesToChatCompletionConverter {
|
|
|
457
457
|
});
|
|
458
458
|
}
|
|
459
459
|
else {
|
|
460
|
-
const itemId = `fc_${
|
|
460
|
+
const itemId = `fc_${state.id}`;
|
|
461
461
|
state.current = {
|
|
462
462
|
type: "function_call",
|
|
463
463
|
itemId,
|
|
@@ -586,7 +586,7 @@ class ResponsesToChatCompletionConverter {
|
|
|
586
586
|
/** Open a message output item and its first content part. */
|
|
587
587
|
openMessage(state, kind, events) {
|
|
588
588
|
state.messageStarted = true;
|
|
589
|
-
const itemId = `
|
|
589
|
+
const itemId = `msg_${state.id}`;
|
|
590
590
|
const msgOutputIndex = state.outputIndex + state.toolCallCount;
|
|
591
591
|
state.current = {
|
|
592
592
|
type: "message",
|
|
@@ -1125,9 +1125,11 @@ class ResponsesToChatCompletionConverter {
|
|
|
1125
1125
|
resp.top_logprobs = echoed.top_logprobs;
|
|
1126
1126
|
resp.safety_identifier =
|
|
1127
1127
|
echoed.safety_identifier != null ? echoed.safety_identifier : null;
|
|
1128
|
-
resp.service_tier = echoed.service_tier != null ? echoed.service_tier : "
|
|
1129
|
-
|
|
1130
|
-
|
|
1128
|
+
resp.service_tier = echoed.service_tier != null ? echoed.service_tier : "auto";
|
|
1129
|
+
resp.prompt_cache_key =
|
|
1130
|
+
this.requestParams?.prompt_cache_key !== undefined
|
|
1131
|
+
? this.requestParams.prompt_cache_key
|
|
1132
|
+
: null;
|
|
1131
1133
|
resp.prompt_cache_retention =
|
|
1132
1134
|
this.requestParams?.prompt_cache_retention !== undefined
|
|
1133
1135
|
? this.requestParams.prompt_cache_retention
|