You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/agents-core/src/runImplementation.ts
+2-14Lines changed: 2 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -1705,6 +1705,8 @@ export function extractOutputItemsFromRunItems(
1705
1705
.map((item)=>item.rawItemasAgentInputItem);
1706
1706
}
1707
1707
1708
+
// Carries metadata while recursively sanitizing nested payloads so binary blobs can share the
1709
+
// appropriate media type when converted into durable data URLs.
1708
1710
typeSessionBinaryContext={
1709
1711
mediaType?: string;
1710
1712
};
@@ -1923,20 +1925,6 @@ export async function prepareInputItemsWithSession(
1923
1925
? [...input]
1924
1926
: toInputItemList(input);
1925
1927
1926
-
// When callers hand us pre-expanded AgentInputItems we cannot guess how to merge them with
1927
-
// previously persisted history without risking duplicate tool outputs or approvals. Align with
1928
-
// the Python SDK by requiring an explicit callback in that scenario so the merge strategy stays
1929
-
// intentional and predictable.
1930
-
if(
1931
-
Array.isArray(input)&&
1932
-
!sessionInputCallback&&
1933
-
includeHistoryInPreparedInput
1934
-
){
1935
-
thrownewUserError(
1936
-
'When using session memory, list inputs require a RunConfig.sessionInputCallback to define how history and new items are merged. Provide a string input instead or disable session memory to manage items manually.',
0 commit comments