-
Notifications
You must be signed in to change notification settings - Fork 6.9k
perf: remove request invalid field #6283
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
Conversation
TestGru AssignmentSummary
Tip You can |
Preview mcp_server Image: |
Preview sandbox Image: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
This is the final PR Bugbot will review for you during this billing cycle
Your free Bugbot reviews will reset on February 12
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| content.map(async (item) => { | ||
| // Remove system filed | ||
|
|
||
| delete item.key; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
S3 key deleted before image loading can use it
High Severity
The delete item.key statement removes the key property before loadUserContentImage is called. However, loadUserContentImage relies on item.key at line 172 to fetch image URLs from S3 storage via getS3ChatSource().createGetChatFileURL(). Since the key is deleted beforehand, the S3 lookup path will never be taken, breaking image loading for S3-stored images when content is an array.
Additional Locations (1)
Docs Preview:🚀 FastGPT Document Preview Ready! |
There was a problem hiding this 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 removes the internal key field from content items before sending requests to LLM APIs to prevent errors with some model interfaces that don't accept this custom field.
Changes:
- Removes the
keyproperty from content items in the LLM request processing pipeline - Updates documentation to reflect this optimization
- Updates the title of a related version document
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/service/core/ai/llm/utils.ts | Adds code to delete the key field from content items before processing LLM requests |
| document/data/doc-last-modified.json | Updates the last modified timestamp for version 4.14.5 documentation |
| document/content/docs/upgrading/4-14/4146.mdx | Documents the new optimization in version 4.14.6 release notes |
| document/content/docs/upgrading/4-14/4145.mdx | Updates the title to indicate the version includes an upgrade script |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const result = ( | ||
| await Promise.all( | ||
| content.map(async (item) => { | ||
| // Remove system filed |
Copilot
AI
Jan 18, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment contains a spelling error. "filed" should be "field".
| // Remove system filed | |
| // Remove system field |
| await Promise.all( | ||
| content.map(async (item) => { | ||
| // Remove system filed | ||
|
|
Copilot
AI
Jan 18, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's an unnecessary blank line between the comment and the code. This blank line should be removed for better code formatting consistency.
Preview fastgpt Image: |
* chore(deps): bump undici from 7.16.0 to 7.18.2 (#6272) Bumps [undici](https://github.com/nodejs/undici) from 7.16.0 to 7.18.2. - [Release notes](https://github.com/nodejs/undici/releases) - [Commits](nodejs/undici@v7.16.0...v7.18.2) --- updated-dependencies: - dependency-name: undici dependency-version: 7.18.2 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump undici in /plugins/webcrawler/SPIDER (#6273) Bumps [undici](https://github.com/nodejs/undici) from 6.21.3 to 6.23.0. - [Release notes](https://github.com/nodejs/undici/releases) - [Commits](nodejs/undici@v6.21.3...v6.23.0) --- updated-dependencies: - dependency-name: undici dependency-version: 6.23.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump tar from 7.4.3 to 7.5.3 in /document (#6282) Bumps [tar](https://github.com/isaacs/node-tar) from 7.4.3 to 7.5.3. - [Release notes](https://github.com/isaacs/node-tar/releases) - [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md) - [Commits](isaacs/node-tar@v7.4.3...v7.5.3) --- updated-dependencies: - dependency-name: tar dependency-version: 7.5.3 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * perf: remove request invalid field (#6283) * V4.14.5.1 dev (#6290) * chore: cherry pick some commits from v4.14.6-dev (#6287) * fix: custom domain limitation (#6265) * fix: system secret (#6259) * fix: system secret * chore: update docs * chore: docs * fix password variable & datetime picker (#6276) * fix password variable & datetime picker * doc * chore: cherry pick some commits from v4.14.6-dev (#6287) * fix: custom domain limitation (#6265) * fix: system secret (#6259) * fix: system secret * chore: update docs * chore: docs * doc * chore: docs --------- Co-authored-by: Finley Ge <32237950+FinleyGe@users.noreply.github.com> Co-authored-by: Finley Ge <finleyge@fastgpt.io> * perf: extname computed (#6285) * perf: extname computed * chore: handle hash or query flags --------- Co-authored-by: Finley Ge <finleyge@fastgpt.io> * chore: docs (#6291) --------- Co-authored-by: heheer <heheer@sealos.io> Co-authored-by: Archer <545436317@qq.com> * chore: deploy scripts (#6293) * docs: 41451 upgrade doc (#6294) * feat: wecom integration (#6234) * wip: wecom * feat: template filter by user tag * feat: wecom pay * fix: some bug * fix: zod error * feat: bill * fix: bill toast * feat: forbidden downgrade plan button * chore(fe): wecom zone * chore: use queue to delete team instead of a session * chore: adjust * feat: wecom bill logic refactor * perf: plan * perf: plan * fix: i18n * chore: adjust * feat: adjust * feat: add wecom config * perf: wecom app template recommendation & system tool preinstall * perf: some variable and tip * update create bill api schema * update create bill api schema * update create bill api schema * feat: wecom * chore: adjust * fix: ts * perf: condition order * perf: condition order --------- Co-authored-by: archer <545436317@qq.com> * feat: system tool config tags (#6257) * fix: price status (#6279) * fix: back button (#6281) --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Archer <545436317@qq.com> Co-authored-by: heheer <heheer@sealos.io>
* feat: wecom integration (#6234) * wip: wecom * feat: template filter by user tag * feat: wecom pay * fix: some bug * fix: zod error * feat: bill * fix: bill toast * feat: forbidden downgrade plan button * chore(fe): wecom zone * chore: use queue to delete team instead of a session * chore: adjust * feat: wecom bill logic refactor * perf: plan * perf: plan * fix: i18n * chore: adjust * feat: adjust * feat: add wecom config * perf: wecom app template recommendation & system tool preinstall * perf: some variable and tip * update create bill api schema * update create bill api schema * update create bill api schema * feat: wecom * chore: adjust * fix: ts * perf: condition order * perf: condition order --------- Co-authored-by: archer <545436317@qq.com> * feat: system tool config tags (#6257) * fix: system secret (#6259) * fix: system secret * chore: update docs * chore: merge main (#6264) * feat: wecom integration (#6234) * wip: wecom * feat: template filter by user tag * feat: wecom pay * fix: some bug * fix: zod error * feat: bill * fix: bill toast * feat: forbidden downgrade plan button * chore(fe): wecom zone * chore: use queue to delete team instead of a session * chore: adjust * feat: wecom bill logic refactor * perf: plan * perf: plan * fix: i18n * chore: adjust * feat: adjust * feat: add wecom config * perf: wecom app template recommendation & system tool preinstall * perf: some variable and tip * update create bill api schema * update create bill api schema * update create bill api schema * feat: wecom * chore: adjust * fix: ts * perf: condition order * perf: condition order --------- Co-authored-by: archer <545436317@qq.com> * feat: system tool config tags (#6257) * fix: system secret (#6259) * fix: system secret * chore: update docs --------- Co-authored-by: archer <545436317@qq.com> * fix: custom domain limitation (#6265) * chore: update version number (#6266) * fix: price status (#6279) * fix: back button (#6281) * chore/rebase main (#6295) * chore(deps): bump undici from 7.16.0 to 7.18.2 (#6272) Bumps [undici](https://github.com/nodejs/undici) from 7.16.0 to 7.18.2. - [Release notes](https://github.com/nodejs/undici/releases) - [Commits](nodejs/undici@v7.16.0...v7.18.2) --- updated-dependencies: - dependency-name: undici dependency-version: 7.18.2 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump undici in /plugins/webcrawler/SPIDER (#6273) Bumps [undici](https://github.com/nodejs/undici) from 6.21.3 to 6.23.0. - [Release notes](https://github.com/nodejs/undici/releases) - [Commits](nodejs/undici@v6.21.3...v6.23.0) --- updated-dependencies: - dependency-name: undici dependency-version: 6.23.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump tar from 7.4.3 to 7.5.3 in /document (#6282) Bumps [tar](https://github.com/isaacs/node-tar) from 7.4.3 to 7.5.3. - [Release notes](https://github.com/isaacs/node-tar/releases) - [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md) - [Commits](isaacs/node-tar@v7.4.3...v7.5.3) --- updated-dependencies: - dependency-name: tar dependency-version: 7.5.3 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * perf: remove request invalid field (#6283) * V4.14.5.1 dev (#6290) * chore: cherry pick some commits from v4.14.6-dev (#6287) * fix: custom domain limitation (#6265) * fix: system secret (#6259) * fix: system secret * chore: update docs * chore: docs * fix password variable & datetime picker (#6276) * fix password variable & datetime picker * doc * chore: cherry pick some commits from v4.14.6-dev (#6287) * fix: custom domain limitation (#6265) * fix: system secret (#6259) * fix: system secret * chore: update docs * chore: docs * doc * chore: docs --------- Co-authored-by: Finley Ge <32237950+FinleyGe@users.noreply.github.com> Co-authored-by: Finley Ge <finleyge@fastgpt.io> * perf: extname computed (#6285) * perf: extname computed * chore: handle hash or query flags --------- Co-authored-by: Finley Ge <finleyge@fastgpt.io> * chore: docs (#6291) --------- Co-authored-by: heheer <heheer@sealos.io> Co-authored-by: Archer <545436317@qq.com> * chore: deploy scripts (#6293) * docs: 41451 upgrade doc (#6294) * feat: wecom integration (#6234) * wip: wecom * feat: template filter by user tag * feat: wecom pay * fix: some bug * fix: zod error * feat: bill * fix: bill toast * feat: forbidden downgrade plan button * chore(fe): wecom zone * chore: use queue to delete team instead of a session * chore: adjust * feat: wecom bill logic refactor * perf: plan * perf: plan * fix: i18n * chore: adjust * feat: adjust * feat: add wecom config * perf: wecom app template recommendation & system tool preinstall * perf: some variable and tip * update create bill api schema * update create bill api schema * update create bill api schema * feat: wecom * chore: adjust * fix: ts * perf: condition order * perf: condition order --------- Co-authored-by: archer <545436317@qq.com> * feat: system tool config tags (#6257) * fix: price status (#6279) * fix: back button (#6281) --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Archer <545436317@qq.com> Co-authored-by: heheer <heheer@sealos.io> * feat: marketplace batch update * chore: components reuse * fix: test case --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: archer <545436317@qq.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: heheer <heheer@sealos.io>
Note
LLM request handling
keyfrom user content parts when building LLM messages to avoid sending unsupported/system fields; continues filtering unsupportedfile_urland emptyimage_urlentries.Docs
4-14/4145.mdxtitle and adds detailed upgrade instructions (incl. upgrade script and env changes).4-14/4146.mdxabout removing extra system fields in LLM requests.doc-last-modified.jsontimestamps for affected docs.Written by Cursor Bugbot for commit aecf7cc. This will update automatically on new commits. Configure here.