mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-07-17 05:20:23 -07:00
refactor(core): model-dependent tool definitions (#18563)
This commit is contained in:
@@ -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();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user