feat(chatmodels): add DaoXE OpenAI-compatible gateway node#6624
feat(chatmodels): add DaoXE OpenAI-compatible gateway node#6624seven7763 wants to merge 1 commit into
Conversation
Add ChatDaoXE + DaoXE API credential for Flowise, following the CometAPI OpenAI-compatible pattern with baseURL https://daoxe.com/v1. Model IDs are account-scoped (GET /v1/models); no static public price list. Not available in mainland China. Signed-off-by: seven7763 <seven7763@users.noreply.github.com>
There was a problem hiding this comment.
Code Review
This pull request introduces a new ChatDaoXE chat model node and its corresponding DaoXEApi credential component to integrate with the DaoXE API. The review feedback highlights two key improvements: safely parsing the temperature parameter to avoid NaN values when it is not provided, and replacing the deprecated maxTokens property with maxCompletionTokens to align with newer models and SDKs.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| const obj: ChatOpenAIFields = { | ||
| temperature: parseFloat(temperature), | ||
| modelName, | ||
| openAIApiKey, | ||
| apiKey: openAIApiKey, | ||
| streaming: streaming ?? true | ||
| } |
There was a problem hiding this comment.
If temperature is not provided, parseFloat(temperature) will evaluate to NaN. This NaN value is then passed to the ChatOpenAI constructor, which can cause API errors or unexpected behavior. To prevent this, only set the temperature property if it is a valid, non-empty value, adhering to the loose equality standard for nullish checks.
| const obj: ChatOpenAIFields = { | |
| temperature: parseFloat(temperature), | |
| modelName, | |
| openAIApiKey, | |
| apiKey: openAIApiKey, | |
| streaming: streaming ?? true | |
| } | |
| const obj: ChatOpenAIFields = { | |
| modelName, | |
| openAIApiKey, | |
| apiKey: openAIApiKey, | |
| streaming: streaming ?? true | |
| } | |
| if (temperature != null && temperature !== '') { | |
| obj.temperature = parseFloat(temperature) | |
| } |
References
- In JavaScript/TypeScript, use loose equality (
== null) as a standard idiom for a 'nullish' check that covers bothnullandundefined.
| streaming: streaming ?? true | ||
| } | ||
|
|
||
| if (maxTokens) obj.maxTokens = parseInt(maxTokens, 10) |
There was a problem hiding this comment.
To maintain consistency with the main ChatOpenAI node in this repository and to support newer models/SDKs correctly, use maxCompletionTokens instead of the deprecated maxTokens property on the ChatOpenAIFields object.
| if (maxTokens) obj.maxTokens = parseInt(maxTokens, 10) | |
| if (maxTokens) obj.maxCompletionTokens = parseInt(maxTokens, 10) |
Summary
Add DaoXE as a first-class Flowise Chat Model node + credential, same OpenAI-compatible gateway pattern as CometAPI.
DaoXEApi(API key from https://daoxe.com/dashboard)ChatDaoXE→https://daoxe.com/v1via@langchain/openaiChatOpenAIGET /v1/models); no static public model/price tableFiles
packages/components/credentials/DaoXEApi.credential.tspackages/components/nodes/chatmodels/ChatDaoXE/ChatDaoXE.tspackages/components/nodes/chatmodels/ChatDaoXE/daoxe.svgI maintain DaoXE. Examples: https://github.com/seven7763/DaoXE-AI
Why
Flowise is popular for low-code agents among price-sensitive builders (including Vietnam and CIS Russian-speaking communities). A named DaoXE node is clearer than routing through generic
ChatOpenAICustom.Test plan
GET /v1/modelshttps://daoxe.com/v1