fix: route btw provider streams by workspace (#70413) (thanks @suboss87)

This commit is contained in:
Peter Steinberger
2026-04-23 03:52:59 +01:00
parent bc3c8eee2c
commit 1c91f3f09f
3 changed files with 8 additions and 5 deletions

View File

@@ -34,6 +34,7 @@ Docs: https://docs.openclaw.ai
### Fixes
- Agents/BTW: route `/btw` side questions through provider stream registration with the session workspace, so Ollama provider URL construction and workspace-scoped hooks apply correctly. Fixes #68336. (#70413) Thanks @suboss87.
- Codex harness: route Codex-tagged MCP tool approval elicitations through OpenClaw plugin approvals, including current empty-schema app-server requests, while leaving generic user-input prompts fail-closed. (#68807) Thanks @kesslerio.
- WhatsApp/outbound: hold an in-memory active-delivery claim while a live outbound send is in flight, so a concurrent reconnect drain no longer re-drives the same pending queue entry and duplicates cron sends 7-12x after the 30-minute inbound-silence watchdog fires mid-delivery. Crash-replay of fresh queue entries left behind by a dead process is preserved because the claim is intentionally process-local. Fixes #70386. (#70428) Thanks @neeravmakwana.
- Providers/SDK retry: cap long `Retry-After` sleeps in Stainless-based Anthropic/OpenAI model SDKs so 60s+ retry windows surface immediately for OpenClaw failover instead of blocking the run. (#68474) Thanks @jetd1.

View File

@@ -466,6 +466,7 @@ describe("runBtwSideQuestion", () => {
api: "openai-completions",
baseUrl: "https://ollama.com/",
}),
workspaceDir: "/tmp/workspace",
}),
);
expect(providerStreamFn).toHaveBeenCalledTimes(1);

View File

@@ -398,12 +398,12 @@ export async function runBtwSideQuestion(
apiKeyInfo.mode === "aws-sdk" && !apiKeyInfo.apiKey
? undefined
: requireApiKey(apiKeyInfo, model.provider);
const sessionAgentId = resolveSessionAgentId({
sessionKey: params.sessionKey,
config: params.cfg,
});
const workspaceDir = resolveAgentWorkspaceDir(params.cfg, sessionAgentId);
if (apiKey) {
const sessionAgentId = resolveSessionAgentId({
sessionKey: params.sessionKey,
config: params.cfg,
});
const workspaceDir = resolveAgentWorkspaceDir(params.cfg, sessionAgentId);
const preparedAuth = await prepareProviderRuntimeAuth({
provider: model.provider,
config: params.cfg,
@@ -441,6 +441,7 @@ export async function runBtwSideQuestion(
model: runtimeModel,
cfg: params.cfg,
agentDir: params.agentDir,
workspaceDir,
env: process.env,
});