fix(Google Gemini Chat Model Node): Point the AI builder to the model catalog for new Gemini models (#40159)

Co-authored-by: Mutasem Aldmour <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Raúl Gómez Morales
2026-10-09 10:43:38 +00:00
committed by GitHub
co-authored by Mutasem Aldmour Claude Opus 5.5
parent 8b7065a876
commit c21ed4f13a
2 changed files with 30 additions and 1 deletions
@@ -99,7 +99,10 @@ const modelRLC: INodeProperties = {
},
default: 'models/gemini-2.5-flash',
builderHint: {
propertyHint: MODEL_SELECTION_HINT,
// The dropdown loads through declarative routing, which the builder's resource lookup cannot call.
propertyHint:
'This node declares no model-list lookup, so its models cannot be listed, even with a connected credential. For a new choice, use current Google provider catalog information and choose a Gemini 3.x or newer model ID with the "models/" prefix. Do not choose Gemini 2.x or older. ' +
MODEL_SELECTION_HINT,
},
};
@@ -0,0 +1,26 @@
import { LmChatGoogleGemini } from '../LmChatGoogleGemini.node';
describe('LmChatGoogleGemini', () => {
it('should send every model field to the provider catalog with a Gemini 3.x floor', () => {
const hints = new LmChatGoogleGemini().description.properties
.filter((p) => p.name === 'modelName')
.map((p) => p.builderHint?.propertyHint);
expect(hints).toHaveLength(3);
for (const hint of hints) {
expect(hint).toContain('even with a connected credential');
expect(hint).toContain('use current Google provider catalog information');
expect(hint).toContain('Do not choose Gemini 2.x or older');
}
});
it('should not name builder tools in the model hint', () => {
const hints = new LmChatGoogleGemini().description.properties
.filter((p) => p.name === 'modelName')
.map((p) => p.builderHint?.propertyHint);
for (const hint of hints) {
expect(hint).not.toMatch(/searchModels|explore-resources|nodes\(/);
}
});
});