mirror of
https://github.com/openclaw/openclaw.git
synced 2026-10-03 01:29:56 +00:00
fix(plugins): keep the release-only runtime-llm ownership and isolated-reasoning tests green (#156565)
Operator authority currency no longer folds the caller's own abort signal into assertCurrent, so a caller-aborted direct completion settles through the provider result again instead of rejecting after the stream ended (regressed in #156346). The isolated reasoning validation fixture uses max, which stays unsupported for the host-resolved model now that Ultra is a harness mode on every runtime (#155393). Co-authored-by: Peter Steinberger <studpete@gmail.com>
This commit is contained in:
parent
20445202d3
commit
a93058cf4c
2 changed files with 3 additions and 3 deletions
|
|
@ -364,7 +364,7 @@ describe("runtime.llm.complete isolated agent runtime", () => {
|
|||
await expect(
|
||||
llm.complete({
|
||||
messages: [{ role: "user", content: "Return JSON" }],
|
||||
reasoning: "ultra",
|
||||
reasoning: "max",
|
||||
execution: { mode: "isolated-agent-runtime" },
|
||||
}),
|
||||
).rejects.toMatchObject({ code: "LLM_ISOLATED_INPUT_REJECTED" });
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ export function bindLlmOperatorAuthority(
|
|||
if (hostCaller?.kind === "context-engine") {
|
||||
return await complete(params, {
|
||||
signal: params.signal,
|
||||
assertCurrent: () => params.signal?.throwIfAborted(),
|
||||
assertCurrent: () => {},
|
||||
bindModelExecution: () => undefined,
|
||||
});
|
||||
}
|
||||
|
|
@ -55,10 +55,10 @@ export function bindLlmOperatorAuthority(
|
|||
? AbortSignal.any([params.signal, operatorAuthority.signal])
|
||||
: operatorAuthority.signal
|
||||
: params.signal;
|
||||
// Operator currency only: the caller's own abort settles through the provider result.
|
||||
const assertCurrent = () => {
|
||||
capturedOperator.assertInvocationCurrent?.();
|
||||
operatorAuthority?.assertCurrent();
|
||||
signal?.throwIfAborted();
|
||||
};
|
||||
assertCurrent();
|
||||
return await complete(params, {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue