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

[Bug] 使用claude thinking时会出现max token小于thinking budgets #6918

Open
fzlzjerry opened this issue Mar 12, 2025 · 2 comments
Open
Labels
🐛 Bug Something isn't working | 缺陷

Comments

@fzlzjerry
Copy link
Contributor

📦 Platform

Vercel

📦 Deploymenet mode

server db(lobe-chat-database image)

📌 Version

latest

💻 Operating System

macOS

🌐 Browser

Other

🐛 Bug Description

当将claude3.7的thinking budgets设置到64k的时候,会出现以下问题,但是我并没有开启单词回复最大用量的限制

{
  "error": {
    "type": "invalid_request_error",
    "message": "`max_tokens` must be greater than `thinking.budget_tokens`. Please consult our documentation at https://****/en/docs/build-with-claude/extended-thinking (request id: 20250312105351598489705tKNBl9ln)"
  },
  "endpoint": "https://api.ep****ne.chat/",
  "provider": "anthropic"
}

📷 Recurrence Steps

No response

🚦 Expected Behavior

No response

📝 Additional Information

No response

@fzlzjerry fzlzjerry added the 🐛 Bug Something isn't working | 缺陷 label Mar 12, 2025
@github-project-automation github-project-automation bot moved this to Roadmap - Chat 1.x in Lobe Chat Routine Mar 12, 2025
@canisminor1990
Copy link
Member

👀 @fzlzjerry

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
Please make sure you have given us as much context as possible.
非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

Copy link

dosubot bot commented Mar 12, 2025

The error you're encountering is due to the Claude API's token limit. The API enforces a maximum of 64,000 tokens, calculated as 64 * 1000, not 65,536 tokens. When you set the thinking budgets to 64k as 65,536 tokens, it exceeds the API's maximum allowed number of output tokens, resulting in the error message "max_tokens must be greater than thinking.budget_tokens" [1].

To resolve this, ensure that the thinking budget does not exceed 64,000 tokens. Adjust your settings accordingly to stay within this limit.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working | 缺陷
Projects
Status: Roadmap - Chat 1.x
Development

No branches or pull requests

2 participants