Skip to content

fix(agents): skip forced store=true when model declares supportsStore=false#25088

Closed
MoerAI wants to merge 1 commit intoopenclaw:mainfrom
MoerAI:fix/azure-responses-supports-store
Closed

fix(agents): skip forced store=true when model declares supportsStore=false#25088
MoerAI wants to merge 1 commit intoopenclaw:mainfrom
MoerAI:fix/azure-responses-supports-store

Conversation

@MoerAI
Copy link
Contributor

@MoerAI MoerAI commented Feb 24, 2026

Summary

Fixes #25058

When using the azure-responses provider with compat.supportsStore=false, the adapter still forces store=true in the request payload. Azure OpenAI Responses API then returns HTTP 400 because it references a prior rs_* response ID that was never persisted.

Root Cause

createOpenAIResponsesStoreWrapper forces store=true for all OpenAI Responses API providers via shouldForceResponsesStore(). This function checks the API type and provider but never checks the compat.supportsStore flag, so models configured with supportsStore: false still get store=true injected.

Fix

Added an early return in shouldForceResponsesStore() that checks model.compat?.supportsStore === false. When this flag is explicitly set to false, the function returns false and the store wrapper skips the store=true injection.

Before

{
  "providers": {
    "azure-responses": {
      "models": [{ "id": "gpt-5.2", "compat": { "supportsStore": false } }]
    }
  }
}

→ HTTP 400: Item with id 'rs_...' not found. Items are not persisted when store is set to false.

After

With supportsStore: false, the adapter no longer injects store=true, preventing the 400 error.

Verification

  • LSP diagnostics clean
  • The check is minimal and early-exit — no behavioral change for providers that don't set supportsStore: false

Greptile Summary

Adds an early-exit check in shouldForceResponsesStore() to respect model.compat.supportsStore === false, preventing forced store=true injection for models that explicitly declare they don't support server-side persistence.

  • The fix is a minimal, well-placed guard that short-circuits before the existing API/provider checks
  • Uses strict === false comparison, so only explicit opt-outs are affected — no behavioral change for models that omit the flag
  • The compat type annotation aligns with the existing ModelCompatConfig type and Zod schema (ModelCompatSchema)
  • Note: the PR description's Azure scenario may not perfectly match the current guard logic (Azure providers typically wouldn't pass the OPENAI_RESPONSES_PROVIDERS check), but the fix is still correct as a general-purpose guard for any provider/API combination where supportsStore: false is set
  • No tests are included; the shouldForceResponsesStore function had no tests prior to this PR either

Confidence Score: 4/5

  • This PR is safe to merge — a minimal, defensive early-return guard with no side effects on existing behavior.
  • The change is small (6 lines), logically correct (strict === false check), properly typed, and doesn't alter behavior for any model that doesn't explicitly set supportsStore: false. No tests are included but the risk surface is very low.
  • No files require special attention.

Last reviewed commit: f4db921

@openclaw-barnacle openclaw-barnacle bot added agents Agent runtime and tooling size: XS labels Feb 24, 2026
Copy link

@SamuelHinestrosa SamuelHinestrosa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revisión automática: Cambios revisados. Asegurar que los tests pasen.

@MoerAI MoerAI force-pushed the fix/azure-responses-supports-store branch from f4db921 to 956acbe Compare February 24, 2026 07:22
@MoerAI MoerAI force-pushed the fix/azure-responses-supports-store branch from 956acbe to b0fc435 Compare February 27, 2026 12:11
@steipete steipete self-assigned this Feb 27, 2026
steipete added a commit that referenced this pull request Feb 27, 2026
, #22441, #25088)

Landed from contributor PRs #16930, #22441, and #25088.

Co-authored-by: liweiguang <codingpunk@gmail.com>
Co-authored-by: EdwardWu7 <wuzhiyuan7@gmail.com>
Co-authored-by: MoerAI <friendnt@g.skku.edu>
@steipete
Copy link
Contributor

Landed on main as 8da3a9a92d9c2c6db6fa6caa881e9310d1792e93.

Rewrite summary:

SHA notes:

  • Original PR commit: b0fc4350f5a71d774f745cac5cf5189f96050a21
  • Landed commit: 8da3a9a92d9c2c6db6fa6caa881e9310d1792e93

Thanks @MoerAI.

@steipete steipete closed this Feb 27, 2026
execute008 pushed a commit to execute008/openclaw that referenced this pull request Feb 27, 2026
…nclaw#16930, openclaw#22441, openclaw#25088)

Landed from contributor PRs openclaw#16930, openclaw#22441, and openclaw#25088.

Co-authored-by: liweiguang <codingpunk@gmail.com>
Co-authored-by: EdwardWu7 <wuzhiyuan7@gmail.com>
Co-authored-by: MoerAI <friendnt@g.skku.edu>
r4jiv007 pushed a commit to r4jiv007/openclaw that referenced this pull request Feb 28, 2026
…nclaw#16930, openclaw#22441, openclaw#25088)

Landed from contributor PRs openclaw#16930, openclaw#22441, and openclaw#25088.

Co-authored-by: liweiguang <codingpunk@gmail.com>
Co-authored-by: EdwardWu7 <wuzhiyuan7@gmail.com>
Co-authored-by: MoerAI <friendnt@g.skku.edu>
xiexikang pushed a commit to C-clawd/cclawd that referenced this pull request Feb 28, 2026
…nclaw#16930, openclaw#22441, openclaw#25088)

Landed from contributor PRs openclaw#16930, openclaw#22441, and openclaw#25088.

Co-authored-by: liweiguang <codingpunk@gmail.com>
Co-authored-by: EdwardWu7 <wuzhiyuan7@gmail.com>
Co-authored-by: MoerAI <friendnt@g.skku.edu>
mylukin pushed a commit to mylukin/openclaw that referenced this pull request Feb 28, 2026
…nclaw#16930, openclaw#22441, openclaw#25088)

Landed from contributor PRs openclaw#16930, openclaw#22441, and openclaw#25088.

Co-authored-by: liweiguang <codingpunk@gmail.com>
Co-authored-by: EdwardWu7 <wuzhiyuan7@gmail.com>
Co-authored-by: MoerAI <friendnt@g.skku.edu>
wanjizheng pushed a commit to wanjizheng/openclaw that referenced this pull request Feb 28, 2026
…nclaw#16930, openclaw#22441, openclaw#25088)

Landed from contributor PRs openclaw#16930, openclaw#22441, and openclaw#25088.

Co-authored-by: liweiguang <codingpunk@gmail.com>
Co-authored-by: EdwardWu7 <wuzhiyuan7@gmail.com>
Co-authored-by: MoerAI <friendnt@g.skku.edu>
wanjizheng pushed a commit to wanjizheng/openclaw that referenced this pull request Feb 28, 2026
…nclaw#16930, openclaw#22441, openclaw#25088)

Landed from contributor PRs openclaw#16930, openclaw#22441, and openclaw#25088.

Co-authored-by: liweiguang <codingpunk@gmail.com>
Co-authored-by: EdwardWu7 <wuzhiyuan7@gmail.com>
Co-authored-by: MoerAI <friendnt@g.skku.edu>
(cherry picked from commit c38be8f)
wanjizheng pushed a commit to wanjizheng/openclaw that referenced this pull request Feb 28, 2026
…nclaw#16930, openclaw#22441, openclaw#25088)

Landed from contributor PRs openclaw#16930, openclaw#22441, and openclaw#25088.

Co-authored-by: liweiguang <codingpunk@gmail.com>
Co-authored-by: EdwardWu7 <wuzhiyuan7@gmail.com>
Co-authored-by: MoerAI <friendnt@g.skku.edu>
(cherry picked from commit c38be8f)
wanjizheng pushed a commit to wanjizheng/openclaw that referenced this pull request Feb 28, 2026
…nclaw#16930, openclaw#22441, openclaw#25088)

Landed from contributor PRs openclaw#16930, openclaw#22441, and openclaw#25088.

Co-authored-by: liweiguang <codingpunk@gmail.com>
Co-authored-by: EdwardWu7 <wuzhiyuan7@gmail.com>
Co-authored-by: MoerAI <friendnt@g.skku.edu>
(cherry picked from commit c38be8f)
vincentkoc pushed a commit to Sid-Qin/openclaw that referenced this pull request Feb 28, 2026
…nclaw#16930, openclaw#22441, openclaw#25088)

Landed from contributor PRs openclaw#16930, openclaw#22441, and openclaw#25088.

Co-authored-by: liweiguang <codingpunk@gmail.com>
Co-authored-by: EdwardWu7 <wuzhiyuan7@gmail.com>
Co-authored-by: MoerAI <friendnt@g.skku.edu>
vincentkoc pushed a commit to rylena/rylen-openclaw that referenced this pull request Feb 28, 2026
…nclaw#16930, openclaw#22441, openclaw#25088)

Landed from contributor PRs openclaw#16930, openclaw#22441, and openclaw#25088.

Co-authored-by: liweiguang <codingpunk@gmail.com>
Co-authored-by: EdwardWu7 <wuzhiyuan7@gmail.com>
Co-authored-by: MoerAI <friendnt@g.skku.edu>
newtontech pushed a commit to newtontech/openclaw-fork that referenced this pull request Feb 28, 2026
…nclaw#16930, openclaw#22441, openclaw#25088)

Landed from contributor PRs openclaw#16930, openclaw#22441, and openclaw#25088.

Co-authored-by: liweiguang <codingpunk@gmail.com>
Co-authored-by: EdwardWu7 <wuzhiyuan7@gmail.com>
Co-authored-by: MoerAI <friendnt@g.skku.edu>
wanjizheng pushed a commit to wanjizheng/openclaw that referenced this pull request Mar 1, 2026
…nclaw#16930, openclaw#22441, openclaw#25088)

Landed from contributor PRs openclaw#16930, openclaw#22441, and openclaw#25088.

Co-authored-by: liweiguang <codingpunk@gmail.com>
Co-authored-by: EdwardWu7 <wuzhiyuan7@gmail.com>
Co-authored-by: MoerAI <friendnt@g.skku.edu>
wanjizheng pushed a commit to wanjizheng/openclaw that referenced this pull request Mar 1, 2026
…nclaw#16930, openclaw#22441, openclaw#25088)

Landed from contributor PRs openclaw#16930, openclaw#22441, and openclaw#25088.

Co-authored-by: liweiguang <codingpunk@gmail.com>
Co-authored-by: EdwardWu7 <wuzhiyuan7@gmail.com>
Co-authored-by: MoerAI <friendnt@g.skku.edu>
steipete added a commit to Sid-Qin/openclaw that referenced this pull request Mar 2, 2026
…nclaw#16930, openclaw#22441, openclaw#25088)

Landed from contributor PRs openclaw#16930, openclaw#22441, and openclaw#25088.

Co-authored-by: liweiguang <codingpunk@gmail.com>
Co-authored-by: EdwardWu7 <wuzhiyuan7@gmail.com>
Co-authored-by: MoerAI <friendnt@g.skku.edu>
safzanpirani pushed a commit to safzanpirani/clawdbot that referenced this pull request Mar 2, 2026
…nclaw#16930, openclaw#22441, openclaw#25088)

Landed from contributor PRs openclaw#16930, openclaw#22441, and openclaw#25088.

Co-authored-by: liweiguang <codingpunk@gmail.com>
Co-authored-by: EdwardWu7 <wuzhiyuan7@gmail.com>
Co-authored-by: MoerAI <friendnt@g.skku.edu>
steipete added a commit to Sid-Qin/openclaw that referenced this pull request Mar 2, 2026
…nclaw#16930, openclaw#22441, openclaw#25088)

Landed from contributor PRs openclaw#16930, openclaw#22441, and openclaw#25088.

Co-authored-by: liweiguang <codingpunk@gmail.com>
Co-authored-by: EdwardWu7 <wuzhiyuan7@gmail.com>
Co-authored-by: MoerAI <friendnt@g.skku.edu>
venjiang pushed a commit to venjiang/openclaw that referenced this pull request Mar 2, 2026
…nclaw#16930, openclaw#22441, openclaw#25088)

Landed from contributor PRs openclaw#16930, openclaw#22441, and openclaw#25088.

Co-authored-by: liweiguang <codingpunk@gmail.com>
Co-authored-by: EdwardWu7 <wuzhiyuan7@gmail.com>
Co-authored-by: MoerAI <friendnt@g.skku.edu>
robertchang-ga pushed a commit to robertchang-ga/openclaw that referenced this pull request Mar 2, 2026
…nclaw#16930, openclaw#22441, openclaw#25088)

Landed from contributor PRs openclaw#16930, openclaw#22441, and openclaw#25088.

Co-authored-by: liweiguang <codingpunk@gmail.com>
Co-authored-by: EdwardWu7 <wuzhiyuan7@gmail.com>
Co-authored-by: MoerAI <friendnt@g.skku.edu>
dorgonman pushed a commit to kanohorizonia/openclaw that referenced this pull request Mar 3, 2026
…nclaw#16930, openclaw#22441, openclaw#25088)

Landed from contributor PRs openclaw#16930, openclaw#22441, and openclaw#25088.

Co-authored-by: liweiguang <codingpunk@gmail.com>
Co-authored-by: EdwardWu7 <wuzhiyuan7@gmail.com>
Co-authored-by: MoerAI <friendnt@g.skku.edu>
sachinkundu pushed a commit to sachinkundu/openclaw that referenced this pull request Mar 6, 2026
…nclaw#16930, openclaw#22441, openclaw#25088)

Landed from contributor PRs openclaw#16930, openclaw#22441, and openclaw#25088.

Co-authored-by: liweiguang <codingpunk@gmail.com>
Co-authored-by: EdwardWu7 <wuzhiyuan7@gmail.com>
Co-authored-by: MoerAI <friendnt@g.skku.edu>
zooqueen pushed a commit to hanzoai/bot that referenced this pull request Mar 6, 2026
…nclaw#16930, openclaw#22441, openclaw#25088)

Landed from contributor PRs openclaw#16930, openclaw#22441, and openclaw#25088.

Co-authored-by: liweiguang <codingpunk@gmail.com>
Co-authored-by: EdwardWu7 <wuzhiyuan7@gmail.com>
Co-authored-by: MoerAI <friendnt@g.skku.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: azure-responses sends rs_* reference when supportsStore=false (store=false 400)

4 participants