Skip to content

fix: preserve Foundry Responses reasoning replay ids#91118

Merged
steipete merged 1 commit into
mainfrom
fix/foundry-responses-reasoning-replay-ids
Jun 7, 2026
Merged

fix: preserve Foundry Responses reasoning replay ids#91118
steipete merged 1 commit into
mainfrom
fix/foundry-responses-reasoning-replay-ids

Conversation

@steipete

@steipete steipete commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • fixes microsoft-foundry Responses continuations by preserving replay item ids for encrypted reasoning items
  • keeps the existing OpenAI Responses wrapper stack for Foundry Responses models while leaving Foundry chat-completions streams untouched
  • adds regression coverage for the Foundry hook and the Responses serializer id-preserving option

Fixes #91033.

Verification

  • node scripts/run-vitest.mjs extensions/microsoft-foundry/index.test.ts src/llm/providers/openai-responses-shared.test.ts
  • pnpm lint:extensions
  • pnpm lint:core
  • pnpm check:test-types
  • pnpm tsgo:extensions
  • pnpm exec oxfmt --check --threads=1 extensions/microsoft-foundry/provider.ts extensions/microsoft-foundry/index.test.ts src/llm/providers/openai-responses-shared.test.ts
  • git diff --check
  • /Users/steipete/Projects/agent-scripts/skills/autoreview/scripts/autoreview --mode local -> clean, no accepted/actionable findings

Live API Proof

Molty 1Password metadata search found no available microsoft-foundry / Foundry / Azure OpenAI credential item, so I could not run a live Foundry request. The fix follows the issue's direct API proof: Foundry accepts encrypted reasoning replay when the original reasoning item id is present and rejects the same replay when the encrypted content is sent without that id.

@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels Jun 7, 2026
@steipete

steipete commented Jun 7, 2026

Copy link
Copy Markdown
Contributor Author

Pre-land proof for this branch:

  • node scripts/run-vitest.mjs extensions/microsoft-foundry/index.test.ts src/llm/providers/openai-responses-shared.test.ts -> passed, 2 Vitest shards, 53 tests.
  • pnpm lint:extensions -> passed.
  • pnpm lint:core -> passed.
  • pnpm check:test-types -> passed.
  • pnpm tsgo:extensions -> passed.
  • pnpm exec oxfmt --check --threads=1 extensions/microsoft-foundry/provider.ts extensions/microsoft-foundry/index.test.ts src/llm/providers/openai-responses-shared.test.ts -> passed.
  • git diff --check -> passed.
  • /Users/steipete/Projects/agent-scripts/skills/autoreview/scripts/autoreview --mode local -> clean, no accepted/actionable findings.

Live API proof gap: Molty 1Password metadata search found no available microsoft-foundry / Foundry / Azure OpenAI credential item, so I could not make a live Foundry call. The code path is still high-certainty: issue #91033 includes direct Foundry API proof that encrypted reasoning replay succeeds with the original reasoning item id and fails when OpenClaw drops that id.

@clawsweeper

clawsweeper Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper status: review started.

I am starting a fresh review of this pull request: fix: preserve Foundry Responses reasoning replay ids This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@steipete
steipete merged commit 248dfb2 into main Jun 7, 2026
173 of 175 checks passed
@steipete
steipete deleted the fix/foundry-responses-reasoning-replay-ids branch June 7, 2026 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: microsoft-foundry reasoning models return 400 invalid_encrypted_content when continuing a thread

1 participant