-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
openai-responses adapter is unusable against Azure OpenAI: every turn returns a synthetic 0-token refusal (openai-completions works) #79570
Copy link
Copy link
Closed as not planned
Closed as not planned
Copy link
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.staleMarked as stale due to inactivityMarked as stale due to inactivity
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.staleMarked as stale due to inactivityMarked as stale due to inactivity
Type
Fields
Priority
None yet
openai-responsesadapter is unusable against Azure OpenAI: every turn returns a synthetic refusal (openai-completionsworks)Severity: Blocks all Azure OpenAI users on the Responses adapter.
Summary
Pointing OpenClaw at Azure OpenAI's OpenAI-v1 surface with
models[].api: "openai-responses"causes every user message to come back as"I'm sorry, but I cannot assist with that request."withusage.totalTokens == 0(the model never runs — Azure short-circuits the request). Switching the same model to"openai-completions"makes it work immediately. The trigger is OpenClaw'sSender (untrusted metadata):envelope: Azure's prompt-stage shield on the Responses surface classifies it as Indirect Prompt Injection and refuses, even with a custom RAI policy that disables Jailbreak + Indirect Attack.Why it matters
openai-responsesvsopenai-completions) are presented as interchangeable in config. They aren't on Azure. This is a footgun.Repro (5 minutes)
Send
hello. The session jsonl shows:{ "role": "assistant", "content": [{"type": "text", "text": "I'm sorry, but I cannot assist with that request."}], "usage": {"input": 0, "output": 0, "totalTokens": 0}, "stopReason": "stop" }Flip to
"api": "openai-completions". Sendhello→ normal greeting.Confirmed not a model / policy issue
A direct call to the same Azure deployment at
/openai/v1/responseswith the bare envelope returns HTTP 200 +usage.input_tokens=65+"Hello! How can I help you today?". The shield only fires on the payload OpenClaw assembles for the Responses adapter (system prompt +## Inbound Context (trusted metadata)+ fencedSender (untrusted metadata):user block + tool catalog + injected workspace files).Source pointer
Likely culprit:
src/auto-reply/reply/inbound-meta.ts—buildInboundUserContextPrefixemits a fencedSender (untrusted metadata):JSON block on every user turn, paired with a## Inbound Context (trusted metadata)system block frombuildInboundMetaSystemPrompt. On Azure OpenAI's Responses surface, this two-block fingerprint trips an undocumented prompt-stage shield that fires even when the visibleIndirect AttackRAI filter is set non-blocking. The same envelope works onopenai-completionsand on direct AOAI Responses calls without the system-block pairing.Suggested fixes (any one unblocks Azure users)
agents.defaults.senderEnvelope: "off"config to opt out of theSender (untrusted metadata)wrapper for single-tenant trusted-channel deployments (e.g. WebChat-only behind Easy Auth) where there is no untrusted sender.metadatafield or a non-text item) so it doesn't read as injection-shaped.openai-completionsuntil 1 or 2 lands.Environment
npm install -g openclaw@latest, image built 2026-04-24)gpt-5-mini2025-08-07 GlobalStandard, OpenAI-v1 surface, managed-identity auth