Skip to content

feat(core): sync models.dev reasoning options#31581

Open
rekram1-node wants to merge 2 commits into
devfrom
reasoning-options
Open

feat(core): sync models.dev reasoning options#31581
rekram1-node wants to merge 2 commits into
devfrom
reasoning-options

Conversation

@rekram1-node

@rekram1-node rekram1-node commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • parse provider-specific reasoning_options from models.dev using typed known variants plus an open fallback for future option types and fields
  • expose a discriminated toggle | effort | budget_tokens union through legacy provider and V2 model capabilities
  • normalize raw options at catalog boundaries: retain open effort strings, remove nullable no-reasoning markers, and ignore unknown option types without failing refreshes
  • preserve typed reasoning options through provider configuration overlays and regenerate SDK types

Compatibility

  • raw models.dev decoding accepts and preserves unknown option types and additional fields
  • resolved HTTP/SDK models expose the currently supported typed union
  • new effort values remain valid because effort values are open strings

Testing

  • bun test test/models.test.ts test/plugin/models-dev.test.ts in packages/core
  • bun test test/provider/provider.test.ts in packages/opencode
  • bun typecheck in packages/core
  • bun typecheck in packages/opencode
  • bun typecheck in packages/sdk/js
  • git diff --check

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