Skip to content

feat(provider): add reasoning variants for Together AI, OpenRouter, and OpenAI-compatible providers - #12145

Closed
esteve wants to merge 1 commit into
anomalyco:devfrom
esteve:reasoning-variants
Closed

esteve wants to merge 1 commit into
anomalyco:devfrom
esteve:reasoning-variants

Conversation

@esteve

@esteve esteve commented Feb 4, 2026 •

Copy link
Copy Markdown

What does this PR do?

This PR adds support for setting the reasoning effort / toggling reasoning on models that support reasoning for several providers (i.e. Together.AI, OpenAI-compatible providers and OpenRouter). The changes are quite straightfoward for OpenAI-compatible providers and Together.AI, but OpenRouter required a switch to account for each different model family.

Synthetic.new (OpenAI-compatible) does not seem to support disabling reasoning and returns an error when passing reasoningEffort: "none". Synthetic.new uses vLLM as its backend, and the vLLM documentation apparently supports disabling reasoning (via enable_thinking: false), but Synthetic.new does not expose that case in their OpenAI API endpoint. The other OpenAI-compatible providers I tried (Opencode Zen, Fireworks AI) worked fine.

How did you verify your code works?

I ran bun run dev and used Kimi K2.5 on Together.AI, Synthetic.new, Opencode Zen and Openrouter, toggling reasoning.

Fixes #12155

@github-actions

github-actions Bot commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions

github-actions Bot commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

I found one potentially related PR:

PR #12117: fix(provider): respect thinking toggle for Gemini models
#12117

This PR appears related as it also deals with reasoning/thinking features for provider models. While it focuses on Gemini specifically, it's working on a similar concern (controlling reasoning behavior across different providers). This could potentially be addressing a related or overlapping issue with reasoning support.

Note: PR #12145 is the current PR you're checking, and PR #7608 about OAuth Codex filter model variants is not related to reasoning features.

@rekram1-node

Copy link
Copy Markdown
Collaborator

some of these models dont support variants, like minimax

@esteve
esteve force-pushed the reasoning-variants branch 2 times, most recently from 8fb71c9 to d910b79 Compare February 4, 2026 21:26
…outer, and OpenAI-compatible providers

- Toggle-only families (deepseek, minimax, glm, mistral, kimi): use correct provider-specific format
- OpenRouter: { reasoning: { effort } } for variants, { reasoning: { enabled: false } } to disable
- Together AI: reasoning_effort with reasoning.enabled: false to disable
- OpenAI-compatible: reasoningEffort (Synthetic.new excluded from none)
@esteve

esteve commented Feb 4, 2026

Copy link
Copy Markdown
Author

@rekram1-node you're right, I've pushed more changes so that those models do not expose reasoning effort level, but still allow for toggling the reasoning value.

@github-actions

github-actions Bot commented Apr 6, 2026

Copy link
Copy Markdown
Contributor

Closing this pull request because it has had no updates for more than 60 days. If you plan to continue working on it, feel free to reopen or open a new PR.

@github-actions github-actions Bot closed this Apr 6, 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.

missing reasoning variants for multiple providers

2 participants