-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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: Add reasoning effort control for Claude 3.7 #2540
base: main
Are you sure you want to change the base?
Conversation
…c Provider and OpenAI Provider - Add reasoning effort settings with low/medium/high options - Implement reasoning effort for Claude 3.7 Sonnet models - Update localization tips for reasoning effort - Enhance provider handling of reasoning effort parameters
大概说明一下,对于推理相关参数的处理复用了新版OpenRouterAPI: https://openrouter.ai/docs/use-cases/reasoning-tokens {
"model": "your-model",
"messages": [],
"reasoning": {
// One of the following (not both):
"effort": "high", // Can be "high", "medium", or "low" (OpenAI-style)
"max_tokens": 2000, // Specific token limit (Anthropic-style)
// Optional: Default is false. All models support this.
"exclude": false // Set to true to exclude reasoning tokens from response
}
}
所以我们只需要2选1,最好的方法就是复用本身有的UI即可,这样一个配置就能支持 ![]() 在这里 如果是o3系列和o1模型或者是OpenRouter的claude-sonnet-3.7,就会直接使用reasoning_effort 如果要Claude开启推理,只需要打开思维链长度即可 关闭思维链时: ![]() 打开思维链时 ![]() 如果要使用满血思考,可以把max_tokens拉到官方推荐的128k token 然后这位老哥 @preszzz 提到的直接在渲染进程发起请求这问题,我感觉没必要单独处理一个Claude-3.7。如果确实需要处理,需要把所有api请求搬到主进程,然后为APIKey加密存储,防止恶意软件。后面可以考虑整体进行改动 总之这样在前端进行了最小的改动,把budget_token的使用交给程序,这样也避免用户设置超过max_token的budget_token |
@ousugo 麻烦看一下,感谢🙏 |
我觉得可以 👍 ,让猫哥再看一下就可以了 |
Resolve #2304