mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-08-04 14:57:42 +00:00
🐛 fix: propagate runtime_session_hint to sandbox executor in event-driven tool path
The event-driven ON_TOOL_EXECUTE handler built config.toolCall without the resolved runtime_session_hint, so BashExecutor/CodeExecutor never sent runtime_session_hint to the Code API. Every conversation then collapsed onto the server-derived default session (no per-conversation isolation). Copy tc.runtimeSessionHint onto toolCallConfig._runtime_session_hint, mirroring the SDK direct-execution path.
This commit is contained in:
parent
268fad78c2
commit
45c1cd74c6
1 changed files with 12 additions and 0 deletions
|
|
@ -3340,6 +3340,18 @@ export function createToolExecuteHandler(options: ToolExecuteOptions): EventHand
|
|||
turn: tc.turn,
|
||||
};
|
||||
|
||||
/* Stateful runtime-session hint: the SDK resolves it onto
|
||||
* the request for execute_code/bash (orthogonal to the
|
||||
* transient exec-session below — a first call has a hint but
|
||||
* no session yet). The remote executors read it off
|
||||
* `config.toolCall._runtime_session_hint`; without this the
|
||||
* event-driven ON_TOOL_EXECUTE path drops it and every
|
||||
* conversation collapses onto the Code API's `default`
|
||||
* session (no per-conversation isolation). */
|
||||
if (tc.runtimeSessionHint != null && tc.runtimeSessionHint !== '') {
|
||||
toolCallConfig._runtime_session_hint = tc.runtimeSessionHint;
|
||||
}
|
||||
|
||||
if (
|
||||
tc.codeSessionContext &&
|
||||
isCodeSessionAwareToolCall(tc.name, mergedConfigurable)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue