Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support OpenRouter reasoning #2108

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Laisky
Copy link
Contributor

@Laisky Laisky commented Feb 19, 2025

解决的问题

目前 deepseek-r1 的 reasoning 返回格式有三个流派:

  1. 【已支持】deepseek 官方,使用 reasoning_content
  2. 【已支持】第三方供应商使用 <think></think> 包裹,放置在 content 中
  3. 【不支持】OpenRouter 使用自定义的 reasoning 字段

该 PR 就是支持了 openrouter 的格式,在请求时自动添加 include_reasoning

ref: https://openrouter.ai/docs/api-reference/parameters#include-reasoning

自测

CleanShot 2025-02-19 at 09 25 18@2x

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