Skip to content

feat(components): improve Baidu Wenxin chat model configuration#6140

Open
jimmyzhuu wants to merge 1 commit intoFlowiseAI:mainfrom
jimmyzhuu:codex/baidu-wenxin-node-upgrade
Open

feat(components): improve Baidu Wenxin chat model configuration#6140
jimmyzhuu wants to merge 1 commit intoFlowiseAI:mainfrom
jimmyzhuu:codex/baidu-wenxin-node-upgrade

Conversation

@jimmyzhuu
Copy link
Copy Markdown

@jimmyzhuu jimmyzhuu commented Apr 3, 2026

What changed

This PR improves the existing Baidu Wenxin chat model node by bringing it closer to the configuration experience of other chat model providers in Flowise.

Changes included:

  • switch modelName from free-text input to shared async model options
  • add a customModelName override for newer or unsupported Qianfan model IDs
  • expose additional supported chat parameters:
  • topP
  • penaltyScore
  • userId
  • add shared model metadata entries for common Baidu Qianfan chat models
  • add focused unit tests for model loading and advanced parameter mapping

Why this change is needed

Flowise already supports Baidu Wenxin as a chat provider, but the node was missing a few usability and parity features that exist in other chat model nodes:

  • model selection required manual typing
  • users had no fallback for custom/new model IDs
  • some supported SDK parameters were not configurable from the node

This made the Baidu node less consistent and less convenient to use than other existing providers.

User impact

Users can now:

  • select common Baidu Qianfan chat models from a dropdown
  • still provide a custom model ID when needed
  • tune additional supported request parameters without editing code

This keeps the node lightweight while making it much easier to use in real chatflow setups.

Tests / validation

Validated with:

  • targeted unit test for ChatBaiduWenxin
  • TypeScript no-emit check for packages/components

Commands used:

  • corepack pnpm@10.26.0 --dir packages/components test -- ChatBaiduWenxin.test.ts
  • corepack pnpm@10.26.0 --dir packages/components exec tsc --noEmit -p tsconfig.json

Notes for reviewers

This PR intentionally keeps scope small:

  • no server-side changes
  • no credential schema changes
  • no new dependencies
  • no behavior changes for existing saved nodes unless users opt into the new fields

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the ChatBaiduWenxin component to version 3.0, introducing dynamic model selection via asyncOptions and adding support for customModelName, topP, penaltyScore, and userId parameters. It also includes a new test suite and updates the global models configuration to include several ERNIE models. I have no feedback to provide.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant