Skip to content

fix(llm): omit stateless response item ids#34027

Merged
rekram1-node merged 4 commits into
devfrom
stateless-item-ids
Jun 26, 2026
Merged

fix(llm): omit stateless response item ids#34027
rekram1-node merged 4 commits into
devfrom
stateless-item-ids

Conversation

@rekram1-node

Copy link
Copy Markdown
Collaborator

Summary

  • omit provider item IDs when replaying complete OpenAI reasoning items with store: false
  • retain item IDs internally for summary-block grouping and provider metadata
  • preserve stateful item_reference continuations when storage is enabled

Rationale

The Open Responses input schema makes ReasoningItemParam.id optional, while ItemReferenceParam.id remains required. OpenAI Codex follows that distinction by skipping response item IDs during normal request serialization and only attaching them for its stateful Azure path.

Stateless continuations already carry reasoning.encrypted_content, so they should replay the complete item without asserting the identity of a provider-stored item. This complements #34013, which selects encrypted replay for catalog OpenAI models.

Tests

  • bun run test test/provider/openai-responses.test.ts test/tool-runtime.test.ts: 78 passed
  • bun run test: 281 passed, 30 skipped
  • bun typecheck
  • bunx prettier --check packages/llm/src/protocols/openai-responses.ts packages/llm/test/provider/openai-responses.test.ts packages/llm/test/tool-runtime.test.ts
  • bunx oxlint packages/llm/src/protocols/openai-responses.ts packages/llm/test/provider/openai-responses.test.ts packages/llm/test/tool-runtime.test.ts: zero errors, one pre-existing warning in unchanged test code
  • git diff --check

@rekram1-node rekram1-node merged commit f254476 into dev Jun 26, 2026
8 checks passed
@rekram1-node rekram1-node deleted the stateless-item-ids branch June 26, 2026 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant