mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
Switch utility calls to use the gemini-2.5-flash-lite model (#5193)
Co-authored-by: Anjali Sridhar <anjsridhar@gmail.com>
This commit is contained in:
@@ -7,4 +7,5 @@
|
|||||||
export const DEFAULT_GEMINI_MODEL = 'gemini-2.5-pro';
|
export const DEFAULT_GEMINI_MODEL = 'gemini-2.5-pro';
|
||||||
export const DEFAULT_GEMINI_FLASH_MODEL = 'gemini-2.5-flash';
|
export const DEFAULT_GEMINI_FLASH_MODEL = 'gemini-2.5-flash';
|
||||||
export const DEFAULT_GEMINI_FLASH_LITE_MODEL = 'gemini-2.5-flash-lite';
|
export const DEFAULT_GEMINI_FLASH_LITE_MODEL = 'gemini-2.5-flash-lite';
|
||||||
|
|
||||||
export const DEFAULT_GEMINI_EMBEDDING_MODEL = 'gemini-embedding-001';
|
export const DEFAULT_GEMINI_EMBEDDING_MODEL = 'gemini-embedding-001';
|
||||||
|
|||||||
@@ -17,14 +17,14 @@ import { ReadFileTool } from '../tools/read-file.js';
|
|||||||
import { ReadManyFilesTool } from '../tools/read-many-files.js';
|
import { ReadManyFilesTool } from '../tools/read-many-files.js';
|
||||||
import { GrepTool } from '../tools/grep.js';
|
import { GrepTool } from '../tools/grep.js';
|
||||||
import { LruCache } from './LruCache.js';
|
import { LruCache } from './LruCache.js';
|
||||||
import { DEFAULT_GEMINI_FLASH_MODEL } from '../config/models.js';
|
import { DEFAULT_GEMINI_FLASH_LITE_MODEL } from '../config/models.js';
|
||||||
import {
|
import {
|
||||||
isFunctionResponse,
|
isFunctionResponse,
|
||||||
isFunctionCall,
|
isFunctionCall,
|
||||||
} from '../utils/messageInspectors.js';
|
} from '../utils/messageInspectors.js';
|
||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
|
|
||||||
const EditModel = DEFAULT_GEMINI_FLASH_MODEL;
|
const EditModel = DEFAULT_GEMINI_FLASH_LITE_MODEL;
|
||||||
const EditConfig: GenerateContentConfig = {
|
const EditConfig: GenerateContentConfig = {
|
||||||
thinkingConfig: {
|
thinkingConfig: {
|
||||||
thinkingBudget: 0,
|
thinkingBudget: 0,
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
GenerateContentResponse,
|
GenerateContentResponse,
|
||||||
} from '@google/genai';
|
} from '@google/genai';
|
||||||
import { GeminiClient } from '../core/client.js';
|
import { GeminiClient } from '../core/client.js';
|
||||||
import { DEFAULT_GEMINI_FLASH_MODEL } from '../config/models.js';
|
import { DEFAULT_GEMINI_FLASH_LITE_MODEL } from '../config/models.js';
|
||||||
import { getResponseText, partToString } from './partUtils.js';
|
import { getResponseText, partToString } from './partUtils.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -86,7 +86,7 @@ export async function summarizeToolOutput(
|
|||||||
contents,
|
contents,
|
||||||
toolOutputSummarizerConfig,
|
toolOutputSummarizerConfig,
|
||||||
abortSignal,
|
abortSignal,
|
||||||
DEFAULT_GEMINI_FLASH_MODEL,
|
DEFAULT_GEMINI_FLASH_LITE_MODEL,
|
||||||
)) as unknown as GenerateContentResponse;
|
)) as unknown as GenerateContentResponse;
|
||||||
return getResponseText(parsedResponse) || textToSummarize;
|
return getResponseText(parsedResponse) || textToSummarize;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user