Skip to content

feat(components): add Requesty chat model node#6616

Open
Thibaultjaigu wants to merge 1 commit into
FlowiseAI:mainfrom
Thibaultjaigu:feat/requesty-node
Open

feat(components): add Requesty chat model node#6616
Thibaultjaigu wants to merge 1 commit into
FlowiseAI:mainfrom
Thibaultjaigu:feat/requesty-node

Conversation

@Thibaultjaigu

Copy link
Copy Markdown

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 ChatOpenAI wrapper with a fixed base URL and a dedicated credential.

Changes

  • packages/components/nodes/chatmodels/ChatRequesty/ChatRequesty.ts - node definition (label Requesty, name chatRequesty, type ChatRequesty), same inputs as the OpenRouter node; default base path https://router.requesty.ai/v1.
  • packages/components/nodes/chatmodels/ChatRequesty/FlowiseChatRequesty.ts - ChatRequesty model wrapper subclassing ChatOpenAI with vision/multimodal support, identical to the OpenRouter wrapper.
  • packages/components/nodes/chatmodels/ChatRequesty/requesty.svg - node icon.
  • packages/components/credentials/RequestyApi.credential.ts - requestyApi credential with a requestyApiKey password field.

Model naming follows the provider/model convention (e.g. openai/gpt-4o-mini), the same as OpenRouter. Optional HTTP-Referer / X-Title headers can be supplied via the existing Base Options input.

Notes

  • I do not have the Requesty brand SVG, so the icon reuses a simple generic router-style mark (matching the tabler-style icon the OpenRouter node uses). Happy to swap in the official asset.
  • Nodes and credentials are auto-discovered via directory scan and the gulp icon copy step, so no registry/enum edits were required. I did not find a committed provider list in the README/docs to extend.

Testing

  • prettier --check passes on the new files.
  • tsc -p tsconfig.json on flowise-components reports zero errors attributable to the new files (the only remaining errors are pre-existing missing optional storage type deps unrelated to this change).
  • Verified the base URL, bearer auth, and provider/model naming against the live Requesty endpoint (POST https://router.requesty.ai/v1/chat/completions, model openai/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.

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>

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

Copy link
Copy Markdown
Contributor

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 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.

Comment on lines +10 to +22
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'
}
]
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

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'
            }
        ]
    }

Comment on lines +28 to +34
this.credential = {
label: 'Connect Credential',
name: 'credential',
type: 'credential',
credentialNames: ['requestyApi'],
optional: true
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

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
  1. 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/',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

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.

Suggested change
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/"',

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

Copy link
Copy Markdown
Contributor

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 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.

Comment on lines +28 to +34
this.credential = {
label: 'Connect Credential',
name: 'credential',
type: 'credential',
credentialNames: ['requestyApi'],
optional: true
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

security-high high

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
  1. 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.

Comment on lines +150 to +156
const obj: ChatOpenAIFields = {
temperature: parseFloat(temperature),
modelName,
openAIApiKey: requestyApiKey,
apiKey: requestyApiKey,
streaming: streaming ?? true
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

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.

Suggested change
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/',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

There is a missing closing double quote in the basepath input description string.

Suggested change
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/"',

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