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 07056c8f16
commit 3fb1937247
16 changed files with 550 additions and 102 deletions

View File

@@ -825,4 +825,19 @@ describe('ShellTool', () => {
}
});
});
describe('getSchema', () => {
it('should return the base schema when no modelId is provided', () => {
const schema = shellTool.getSchema();
expect(schema.name).toBe(SHELL_TOOL_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 = shellTool.getSchema(modelId);
expect(schema.name).toBe(SHELL_TOOL_NAME);
expect(schema.description).toMatchSnapshot();
});
});
});