fix(OpenAI Node): Replace hardcoded models with RLC#28226
Merged
michael-radency merged 13 commits intomasterfrom Apr 20, 2026
Merged
fix(OpenAI Node): Replace hardcoded models with RLC#28226michael-radency merged 13 commits intomasterfrom
michael-radency merged 13 commits intomasterfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
There was a problem hiding this comment.
No issues found across 6 files
Architecture diagram
sequenceDiagram
participant UI as n8n UI (Client)
participant Node as OpenAI Node (v2.2)
participant Method as listSearch.ts
participant API as OpenAI API
participant Helper as Binary Helper
Note over UI,API: Resource Selection (Design Time)
UI->>Method: NEW: Request available image models
Method->>API: GET /v1/models
API-->>Method: Returns all model IDs
Method->>Method: NEW: Filter for IDs including "dall-e" or "gpt-image"
Method-->>UI: Return filtered list (RLC)
Note over UI,API: Node Execution (Runtime)
UI->>Node: Execute "Generate" action
Node->>Node: Check NodeType version (>= 2.2)
alt NEW: Node Version is 2.2+
Node->>Node: Extract value from RLC model parameter
else Legacy Version
Node->>Node: Read static model parameter
end
Node->>Node: CHANGED: Check if model name starts with "gpt-image"
alt Model is "gpt-image-*"
Node->>Node: CHANGED: Disable response_format parameter
Note right of Node: Fixes support for gpt-image-1-mini, etc.
else Model is "dall-e-*"
Node->>Node: Set response_format (url or b64_json)
end
Node->>Node: CHANGED: Map "dalleQuality" option to "quality" field
Node->>API: POST /v1/images/generations (Body with model & prompt)
API-->>Node: Image data (URL or Base64)
alt NEW/CHANGED: Process gpt-image result (Binary only)
Node->>Helper: prepareBinaryData(base64)
Helper-->>Node: Binary property
else Process dall-e result
alt returnImageUrls is true
Node->>Node: Return JSON with URL
else Default
Node->>Helper: prepareBinaryData(base64)
Helper-->>Node: Binary property
end
end
Node-->>UI: Output Execution Data (Binary or JSON)
| filter?: string, | ||
| ): Promise<INodeListSearchResult> { | ||
| return await getModelSearch( | ||
| (model) => model.id.includes('dall-e') || model.id.includes('gpt-image'), |
Member
There was a problem hiding this comment.
only other model I think we can add is chatgpt-image-latest
Contributor
Performance ComparisonComparing current → latest master → 14-day baseline
Idle baseline with Instance AI module loaded
docker-stats
Memory consumption baseline with starter plan resources
How to read this table
|
…openai-updates-for-ai-gateway
…openai-updates-for-ai-gateway
…hub.com/n8n-io/n8n into node-4791-openai-updates-for-ai-gateway
Bundle ReportChanges will increase total bundle size by 148 bytes (0.0%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: editor-ui-esmAssets Changed:
|
alexander-gekov
approved these changes
Apr 20, 2026
Merged
Contributor
|
Got released with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PR replaces hardcoded models with RLC parameter, fixes bugs with
gpt-imageother thengpt-image-1Related Linear tickets, Github issues, and Community forum posts
https://linear.app/n8n/issue/NODE-4791/openai-updates-for-ai-gateway
Review / Merge checklist
Backport to Beta,Backport to Stable, orBackport to v1(if the PR is an urgent fix that needs to be backported)