-
Notifications
You must be signed in to change notification settings - Fork 59.7k
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
fix: config hydration and default model forced to set gpt-3.5-turbo #5444
fix: config hydration and default model forced to set gpt-3.5-turbo #5444
Conversation
@skymkmk is attempting to deploy a commit to the NextChat Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughThe changes involve modifications to the logic within the Changes
Possibly related PRs
Recent review detailsConfiguration used: CodeRabbit UI Files selected for processing (2)
Additional comments not posted (2)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Your build has completed! |
💻 变更类型 | Change Type
🔀 变更说明 | Description of Change
修复了持久模型不随源码更新而更新的问题
修复了当服务器未设置默认模型时默认模型不跟随
DEFAULT_CONFIG
而被强制设置为gpt-3.5-turbo
的问题📝 补充信息 | Additional Information
#5433 应当是历史遗留问题:zustand 在水和时,默认执行的是
{...currentState, ...persistedState}
,这样做很不幸models
会被persistedState
覆盖;同时mergeModels
方法在home
组件挂载时,会被执行一次,可见ChatGPT-Next-Web/app/components/home.tsx
Lines 209 to 221 in 027e5ad
可能是由于竞争的关系,很不幸
mergeModels
的努力会被 zustand 水合时给覆盖掉,但 在开发时,React 严格模式会挂载组件 两次,而此刻mergeModels
竞争过了水合,所以在开发模式下未重现此问题;而平常很多人的使用环境都是在 server 端 customize 模型,所以很难发现这种问题。我认为所有找不到 o1 模型的人,理应也找不到
chatgpt-4o-latest
等随着时间更新的模型。个人愚见,欢迎讨论。Summary by CodeRabbit