diff options
| author | Evan Senter <[email protected]> | 2025-04-18 17:06:16 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-04-18 17:06:16 +0100 |
| commit | cb303514035440b1631964cad5093a4c80cd3e43 (patch) | |
| tree | 22e0fec54cfa795cf92d0a32bceafd0c3270e603 /packages/cli/src/core/gemini-client.ts | |
| parent | b56d9c863982bebe9d22871ea5b927e8eacca862 (diff) | |
Adding a new parameter for model, and updating the default to 2.5 Flash. (#18)
Diffstat (limited to 'packages/cli/src/core/gemini-client.ts')
| -rw-r--r-- | packages/cli/src/core/gemini-client.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/packages/cli/src/core/gemini-client.ts b/packages/cli/src/core/gemini-client.ts index 41cabdb7..c7c7b5f6 100644 --- a/packages/cli/src/core/gemini-client.ts +++ b/packages/cli/src/core/gemini-client.ts @@ -9,6 +9,7 @@ import { Content, } from '@google/genai'; import { getApiKey } from '../config/env.js'; +import { getModel } from '../config/globalConfig.js'; import { CoreSystemPrompt } from './prompts.js'; import { type ToolCallEvent, @@ -45,6 +46,7 @@ export class GeminiClient { public async startChat(): Promise<Chat> { const tools = toolRegistry.getToolSchemas(); + const model = getModel(); // --- Get environmental information --- const cwd = process.cwd(); @@ -73,7 +75,7 @@ ${folderStructure} try { const chat = this.ai.chats.create({ - model: 'gemini-2.0-flash', //'gemini-2.0-flash', + model: model, config: { systemInstruction: CoreSystemPrompt, ...this.defaultHyperParameters, @@ -446,9 +448,10 @@ Respond *only* in JSON format according to the following schema. Do not include contents: Content[], schema: SchemaUnion, ): Promise<any> { + const model = getModel(); try { const result = await this.ai.models.generateContent({ - model: 'gemini-2.0-flash', // Using flash for potentially faster structured output + model: model, config: { ...this.defaultHyperParameters, systemInstruction: CoreSystemPrompt, |
