refactor(core): model-dependent tool definitions (#18563)

This commit is contained in:
Aishanee Shah
2026-02-09 15:46:23 -05:00
committed by GitHub
parent e6241907d6
commit dc942f4e35
16 changed files with 550 additions and 102 deletions
+15
View File
@@ -563,4 +563,19 @@ describe('ReadFileTool', () => {
});
});
});
describe('getSchema', () => {
it('should return the base schema when no modelId is provided', () => {
const schema = tool.getSchema();
expect(schema.name).toBe(ReadFileTool.Name);
expect(schema.description).toMatchSnapshot();
});
it('should return the schema from the resolver when modelId is provided', () => {
const modelId = 'gemini-2.0-flash';
const schema = tool.getSchema(modelId);
expect(schema.name).toBe(ReadFileTool.Name);
expect(schema.description).toMatchSnapshot();
});
});
});