
























@@ -72,11 +72,19 @@ function createNoopTools() {
7272];
7373}
747475-function replayValidationTools(model: Model<Api>) {
76-// Responses-family providers may force a new tool call whenever tools are
77-// present. These live probes validate repaired historical transcript shape,
78-// not fresh tool invocation.
79-return isOpenAIResponsesFamily(model.api) ? undefined : createNoopTools();
75+function replayValidationTools() {
76+return createNoopTools();
77+}
78+79+function disableResponsesReplayToolChoice(payload: unknown, model: Model<Api>): unknown {
80+if (!isOpenAIResponsesFamily(model.api) || !payload || typeof payload !== "object") {
81+return undefined;
82+}
83+const next = payload as { tool_choice?: unknown };
84+// Replay probes include historical tool calls to validate transcript repair,
85+// but they should not force a fresh noop tool call during the live request.
86+next.tool_choice = "none";
87+return next;
8088}
81898290function buildReplayMessages(model: Model<Api>): AgentMessage[] {
@@ -270,12 +278,13 @@ describeLive("tool replay repair live", () => {
270278{
271279systemPrompt: "You are a concise assistant. Follow the user's instruction exactly.",
272280messages: sanitized as never,
273-tools: replayValidationTools(model),
281+tools: replayValidationTools(),
274282},
275283{
276284apiKey: requireApiKey(apiKeyInfo, model.provider),
277285reasoning: "low",
278286maxTokens: 96,
287+onPayload: disableResponsesReplayToolChoice,
279288},
280289120_000,
281290);
@@ -345,12 +354,13 @@ describeLive("tool replay repair live", () => {
345354{
346355systemPrompt: "You are a concise assistant. Follow the user's instruction exactly.",
347356messages: transformed as never,
348-tools: replayValidationTools(model),
357+tools: replayValidationTools(),
349358},
350359{
351360apiKey: requireApiKey(apiKeyInfo, model.provider),
352361reasoning: "low",
353362maxTokens: 96,
363+onPayload: disableResponsesReplayToolChoice,
354364},
355365120_000,
356366);
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。