feat(components): add Requesty chat model node#6616
Conversation
Add a Requesty chat model node mirroring the existing OpenRouter node. Requesty is an OpenAI-compatible LLM gateway, so the node reuses the LangChain ChatOpenAI wrapper with a fixed base URL of https://router.requesty.ai/v1 and a dedicated requestyApi credential. - packages/components/nodes/chatmodels/ChatRequesty/ChatRequesty.ts - packages/components/nodes/chatmodels/ChatRequesty/FlowiseChatRequesty.ts - packages/components/nodes/chatmodels/ChatRequesty/requesty.svg - packages/components/credentials/RequestyApi.credential.ts Signed-off-by: Thibault Jaigu <thibault.jaigu@gmail.com>
There was a problem hiding this comment.
Code Review
This pull request introduces a new integration for Requesty, a chat model gateway. It adds a credential class for managing the Requesty API key, a chat model node wrapping the Requesty Inference API (extending Langchain's ChatOpenAI), and the corresponding SVG icon. The review feedback highlights three main improvements: initializing the declared description property in the credential constructor, making the credential required rather than optional since Requesty requires authentication, and fixing a missing closing double quote in the basepath input parameter's description.
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.
| constructor() { | ||
| this.label = 'Requesty API Key' | ||
| this.name = 'requestyApi' | ||
| this.version = 1.0 | ||
| this.inputs = [ | ||
| { | ||
| label: 'Requesty API Key', | ||
| name: 'requestyApiKey', | ||
| type: 'password', | ||
| description: 'API Key' | ||
| } | ||
| ] | ||
| } |
There was a problem hiding this comment.
The description property is declared on the RequestyAPIAuth class but is never initialized in the constructor. This can lead to undefined values at runtime or potential TypeScript issues. It is recommended to initialize it with a brief description of the credential.
constructor() {
this.label = 'Requesty API Key'
this.name = 'requestyApi'
this.version = 1.0
this.description = 'Credential for Requesty API'
this.inputs = [
{
label: 'Requesty API Key',
name: 'requestyApiKey',
type: 'password',
description: 'API Key'
}
]
}| this.credential = { | ||
| label: 'Connect Credential', | ||
| name: 'credential', | ||
| type: 'credential', | ||
| credentialNames: ['requestyApi'], | ||
| optional: true | ||
| } |
There was a problem hiding this comment.
The credential for Requesty is currently marked as optional: true. Since Requesty is a paid cloud LLM gateway that requires authentication, making the credential required prevents users from saving the node without an API key, which would fail at runtime. It is highly recommended to make the credential required by removing optional: true.
this.credential = {
label: 'Connect Credential',
name: 'credential',
type: 'credential',
credentialNames: ['requestyApi']
}References
- When a feature requires a specific configuration (e.g., an API key for a sandboxed environment), it is preferable to throw an error if the configuration is missing rather than silently falling back to a different implementation.
| type: 'string', | ||
| optional: true, | ||
| default: 'https://router.requesty.ai/v1', | ||
| description: 'Override the default base URL for the API, e.g., "https://api.example.com/v2/', |
There was a problem hiding this comment.
There is a missing closing double quote in the description string of the basepath input parameter (e.g., "https://api.example.com/v2/). Adding the closing double quote improves readability and correctness of the UI description.
| description: 'Override the default base URL for the API, e.g., "https://api.example.com/v2/', | |
| description: 'Override the default base URL for the API, e.g., "https://api.example.com/v2/"', |
There was a problem hiding this comment.
Code Review
This pull request introduces a new integration for Requesty, adding the Requesty API credential, a chat model node, a custom wrapper class extending LangChain's ChatOpenAI, and an SVG icon. The feedback highlights a critical security concern where the credential should be made mandatory to prevent accidental exposure of the local OPENAI_API_KEY to the Requesty gateway. Additionally, the feedback suggests safely parsing the optional temperature parameter to avoid passing NaN values, and correcting a minor typo (a missing closing quote) in the base path description.
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.
| this.credential = { | ||
| label: 'Connect Credential', | ||
| name: 'credential', | ||
| type: 'credential', | ||
| credentialNames: ['requestyApi'], | ||
| optional: true | ||
| } |
There was a problem hiding this comment.
Since ChatRequesty reuses the LangChain ChatOpenAI class under the hood, if the credential is left optional and not provided, LangChain will automatically fall back to the OPENAI_API_KEY environment variable if it is set. This would result in sending the user's OpenAI API key to the Requesty gateway (https://router.requesty.ai/v1), which is a security risk (unintended credential exposure to a third party).
To prevent this, the credential should be required by removing optional: true.
this.credential = {
label: 'Connect Credential',
name: 'credential',
type: 'credential',
credentialNames: ['requestyApi']
}References
- When a feature requires a specific configuration (e.g., an API key for a sandboxed environment), it is preferable to throw an error if the configuration is missing rather than silently falling back to a different implementation.
| const obj: ChatOpenAIFields = { | ||
| temperature: parseFloat(temperature), | ||
| modelName, | ||
| openAIApiKey: requestyApiKey, | ||
| apiKey: requestyApiKey, | ||
| streaming: streaming ?? true | ||
| } |
There was a problem hiding this comment.
If temperature is not provided or is cleared by the user, parseFloat(temperature) will return NaN. Passing NaN to the LangChain model configuration can cause unexpected behavior or runtime errors.
To prevent this, only set the temperature property on the configuration object if a valid value is provided, similar to how other optional numeric parameters are handled.
| const obj: ChatOpenAIFields = { | |
| temperature: parseFloat(temperature), | |
| modelName, | |
| openAIApiKey: requestyApiKey, | |
| apiKey: requestyApiKey, | |
| streaming: streaming ?? true | |
| } | |
| const obj: ChatOpenAIFields = { | |
| modelName, | |
| openAIApiKey: requestyApiKey, | |
| apiKey: requestyApiKey, | |
| streaming: streaming ?? true | |
| } | |
| if (temperature) obj.temperature = parseFloat(temperature) |
| type: 'string', | ||
| optional: true, | ||
| default: 'https://router.requesty.ai/v1', | ||
| description: 'Override the default base URL for the API, e.g., "https://api.example.com/v2/', |
There was a problem hiding this comment.
What
Adds a Requesty chat model node under
packages/components/nodes/chatmodels/ChatRequesty/, mirroring the existing OpenRouter node.Requesty (https://requesty.ai, https://docs.requesty.ai) is an OpenAI-compatible LLM gateway, the same integration shape as the existing OpenRouter node. The node reuses the LangChain
ChatOpenAIwrapper with a fixed base URL and a dedicated credential.Changes
packages/components/nodes/chatmodels/ChatRequesty/ChatRequesty.ts- node definition (labelRequesty, namechatRequesty, typeChatRequesty), same inputs as the OpenRouter node; default base pathhttps://router.requesty.ai/v1.packages/components/nodes/chatmodels/ChatRequesty/FlowiseChatRequesty.ts-ChatRequestymodel wrapper subclassingChatOpenAIwith vision/multimodal support, identical to the OpenRouter wrapper.packages/components/nodes/chatmodels/ChatRequesty/requesty.svg- node icon.packages/components/credentials/RequestyApi.credential.ts-requestyApicredential with arequestyApiKeypassword field.Model naming follows the
provider/modelconvention (e.g.openai/gpt-4o-mini), the same as OpenRouter. OptionalHTTP-Referer/X-Titleheaders can be supplied via the existing Base Options input.Notes
Testing
prettier --checkpasses on the new files.tsc -p tsconfig.jsononflowise-componentsreports zero errors attributable to the new files (the only remaining errors are pre-existing missing optional storage type deps unrelated to this change).provider/modelnaming against the live Requesty endpoint (POST https://router.requesty.ai/v1/chat/completions, modelopenai/gpt-4o-mini) - request succeeded and returned the expected completion.I work at Requesty. This mirrors the existing OpenRouter provider as closely as possible. Happy to adjust or close it if it's not a fit.