fix: include fallbacks in agentTurn hint detection for partial patches

coercePayload() now recognizes fallbacks as an agentTurn-specific field,
so partial payload patches like { fallbacks: [...] } infer kind without
requiring callers to also send kind explicitly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Strider 2026-03-20 21:04:18 +08:00
parent 02896ea17a
commit aa31765544

View File

@ -101,7 +101,8 @@ function coercePayload(payload: UnknownRecord) {
typeof next.model === "string" ||
typeof next.thinking === "string" ||
typeof next.timeoutSeconds === "number" ||
typeof next.allowUnsafeExternalContent === "boolean";
typeof next.allowUnsafeExternalContent === "boolean" ||
Array.isArray(next.fallbacks);
if (hasMessage) {
next.kind = "agentTurn";
} else if (hasText) {