Skip to content

fix(core): preserve provider metadata namespaces#35817

Merged
rekram1-node merged 5 commits into
v2from
preserve-provider-meta
Jul 8, 2026
Merged

fix(core): preserve provider metadata namespaces#35817
rekram1-node merged 5 commits into
v2from
preserve-provider-meta

Conversation

@opencode-agent

@opencode-agent opencode-agent Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • preserve complete provider metadata instead of indexing it by the catalog provider ID
  • merge reasoning metadata across start, delta, and end events by namespace
  • replay namespaced metadata unchanged through native and AI SDK routes
  • retain compatibility with existing flattened session state

Why

The OpenCode provider hosts models backed by multiple API formats while retaining providerID: "opencode". Reasoning metadata is emitted under the underlying namespace, for example anthropic.signature, so indexing it by opencode drops the continuation state.

Verification

  • cd packages/core && bun test test/session-runner-tool-events.test.ts test/session-runner-message.test.ts test/aisdk.test.ts (25 pass)
  • bun typecheck / push hook attempted, but this host exhausted its OS thread limit in unrelated workspace packages (newosproc, errno=11)

@opencode-agent

opencode-agent Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

Audit note: this overlaps #35812, which preserves content-level metadata during AI SDK lowering. Please clarify whether this PR builds on #35812 or supersedes it, and consolidate the merge path before either lands.

@rekram1-node
rekram1-node marked this pull request as ready for review July 8, 2026 01:32
@opencode-agent
opencode-agent Bot force-pushed the preserve-provider-meta branch from 7053369 to 6f455cf Compare July 8, 2026 02:18
@rekram1-node
rekram1-node merged commit ed4f833 into v2 Jul 8, 2026
8 checks passed
@rekram1-node
rekram1-node deleted the preserve-provider-meta branch July 8, 2026 02:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant