Skip to content

fix: model refresh#6725

Merged
c121914yu merged 1 commit intolabring:mainfrom
c121914yu:fix-model
Apr 7, 2026
Merged

fix: model refresh#6725
c121914yu merged 1 commit intolabring:mainfrom
c121914yu:fix-model

Conversation

@c121914yu
Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings April 7, 2026 13:26
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses an LLM model “reset after refresh” issue in the app’s AI settings UI, and updates the self-host documentation to add a new V4.14.11 upgrade note entry.

Changes:

  • Update SettingLLMModel to derive a stable default LLM model and ensure invalid selected models are reset to a valid default when the model list refreshes.
  • Add a new upgrade note page V4.14.11(进行中) and link it in the docs TOC.
  • Refresh doc-last-modified.json timestamps for several docs.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
projects/app/src/components/core/ai/SettingLLMModel/index.tsx Adjusts default-model selection logic to avoid resets when llmModelList changes.
document/data/doc-last-modified.json Updates last-modified timestamps used by docs UI/sitemap.
document/content/docs/toc.mdx Adds TOC link to the new 41411 upgrade page.
document/content/docs/self-host/upgrading/4-14/41411.mdx Adds a new V4.14.11 upgrade note stub including the described fix.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

modelList: llmModelList,
modelSet
modelSet,
defaultLLMModel: getWebDefaultLLMModel(llmModelList).model
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getWebDefaultLLMModel(llmModelList) can return undefined when the model list is empty (it falls back to list[0]). Accessing .model here will throw at render time before the effect guard runs. Use optional chaining / a fallback string, or compute defaultLLMModel only when llmModelList.length > 0.

Suggested change
defaultLLMModel: getWebDefaultLLMModel(llmModelList).model
defaultLLMModel: getWebDefaultLLMModel(llmModelList)?.model

Copilot uses AI. Check for mistakes.
"document/content/docs/self-host/upgrading/4-14/4141.mdx": "2026-03-03T17:39:47+08:00",
"document/content/docs/self-host/upgrading/4-14/41410.en.mdx": "2026-03-31T23:15:29+08:00",
"document/content/docs/self-host/upgrading/4-14/41410.mdx": "2026-04-01T13:34:01+08:00",
"document/content/docs/self-host/upgrading/4-14/41410.mdx": "2026-04-02T13:43:47+08:00",
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A new doc page document/content/docs/self-host/upgrading/4-14/41411.mdx was added (and linked in toc.mdx), but there is no corresponding entry in this doc-last-modified.json map. Since the docs UI/sitemap reads last-modified timestamps from this file, regenerate it (via document/script/initDocTime.js) or add the missing key so the new page has a correct lastUpdate/lastmod.

Suggested change
"document/content/docs/self-host/upgrading/4-14/41410.mdx": "2026-04-02T13:43:47+08:00",
"document/content/docs/self-host/upgrading/4-14/41410.mdx": "2026-04-02T13:43:47+08:00",
"document/content/docs/self-host/upgrading/4-14/41411.mdx": "2026-04-02T13:43:47+08:00",

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 2026

Docs Preview Deployed!

🔗 👀 Click here to visit preview

registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-docs-pr:0a3d5d8aae07e9f518dc652a16da0ae77c7cb620

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 2026

Build Successful - Preview code-sandbox Image for this PR:

registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-pr:code-sandbox_0a3d5d8aae07e9f518dc652a16da0ae77c7cb620

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 2026

Build Successful - Preview mcp_server Image for this PR:

registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-pr:mcp_server_0a3d5d8aae07e9f518dc652a16da0ae77c7cb620

@c121914yu c121914yu merged commit 5c709af into labring:main Apr 7, 2026
10 checks passed
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 2026

Build Successful - Preview fastgpt Image for this PR:

registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-pr:fastgpt_0a3d5d8aae07e9f518dc652a16da0ae77c7cb620

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants