Skip to content

feat(ai): support custom reasoning fields - #38227

Merged
rekram1-node merged 3 commits into
v2from
port-interleaved
Jul 22, 2026
Merged

rekram1-node merged 3 commits into
v2from
port-interleaved

Conversation

@rekram1-node

@rekram1-node rekram1-node commented Jul 22, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • add optional model compatibility.reasoningField with suggested OpenAI-compatible field names and arbitrary string support
  • normalize permissive Models.dev and V1 interleaved values into the compatibility object while retaining native handling for booleans
  • parse custom OpenAI Chat reasoning fields and replay reasoning under the configured field on outbound assistant messages
  • keep structured reasoning_details on the existing automatic metadata path and reject collisions with required assistant message fields
  • document the native V2 config and regenerate the current Promise client with open-string suggestions

Testing

  • bun test test/provider/openai-chat.test.ts and bun typecheck in packages/ai
  • replayed the existing OpenRouter and Vercel reasoning cassettes with explicit compatibility, including signed tool-loop continuations
  • targeted config, Models.dev, and model-resolution tests plus bun typecheck in packages/core
  • bun test test/model.test.ts and bun typecheck in packages/schema
  • bun test test/generate.test.ts and bun typecheck in packages/httpapi-codegen
  • bun test and bun typecheck in packages/client and packages/plugin
  • typechecks in packages/protocol, packages/server, packages/sdk-next, and packages/tui
  • bun validate and bun broken-links in packages/docs

@rekram1-node
rekram1-node merged commit 23483ea into v2 Jul 22, 2026
10 checks passed
@rekram1-node
rekram1-node deleted the port-interleaved branch July 22, 2026 04:43
jinhuang712 pushed a commit to jinhuang712/opencode that referenced this pull request Sep 26, 2026
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