Compare commits

...

3 Commits

Author SHA1 Message Date
Sehoon Shon 96d2c3f861 chore: regenerate settings schema and documentation 2026-03-30 17:41:15 -04:00
Sehoon Shon f8f35ba86f Merge branch 'main' into fix/gemini-3-flash-preview-500-errors 2026-03-30 17:20:34 -04:00
Sehoon Shon 404eb72d4b fix(core): resolve 500 errors with gemini-3-flash-preview model
- Refactor default model configs to prevent Flash models from inheriting thinkingConfig
- Add synthetic model turn to initial chat history to enforce alternating user/model roles required by gemini-3-flash-preview
- Fix trailing newline assertion error in file-system integration test
2026-03-30 17:03:00 -04:00
6 changed files with 71 additions and 36 deletions
+15 -8
View File
@@ -448,16 +448,23 @@ their corresponding top-level category object in your `settings.json` file.
}
}
},
"chat-base": {
"chat-base-no-thinking": {
"extends": "base",
"modelConfig": {
"generateContentConfig": {
"temperature": 1,
"topP": 0.95,
"topK": 64
}
}
},
"chat-base": {
"extends": "chat-base-no-thinking",
"modelConfig": {
"generateContentConfig": {
"thinkingConfig": {
"includeThoughts": true
},
"temperature": 1,
"topP": 0.95,
"topK": 64
}
}
}
},
@@ -488,7 +495,7 @@ their corresponding top-level category object in your `settings.json` file.
}
},
"gemini-3-flash-preview": {
"extends": "chat-base-3",
"extends": "chat-base-no-thinking",
"modelConfig": {
"model": "gemini-3-flash-preview"
}
@@ -500,13 +507,13 @@ their corresponding top-level category object in your `settings.json` file.
}
},
"gemini-2.5-flash": {
"extends": "chat-base-2.5",
"extends": "chat-base-no-thinking",
"modelConfig": {
"model": "gemini-2.5-flash"
}
},
"gemini-2.5-flash-lite": {
"extends": "chat-base-2.5",
"extends": "chat-base-no-thinking",
"modelConfig": {
"model": "gemini-2.5-flash-lite"
}
+1 -1
View File
@@ -132,7 +132,7 @@ describe('file-system', () => {
'Expected to find a write_file tool call',
).toBeTruthy();
const newFileContent = rig.readFile(fileName);
const newFileContent = rig.readFile(fileName).trim();
expect(newFileContent).toBe('hello');
});
@@ -21,16 +21,23 @@ export const DEFAULT_MODEL_CONFIGS: ModelConfigServiceConfig = {
},
},
},
'chat-base': {
'chat-base-no-thinking': {
extends: 'base',
modelConfig: {
generateContentConfig: {
temperature: 1,
topP: 0.95,
topK: 64,
},
},
},
'chat-base': {
extends: 'chat-base-no-thinking',
modelConfig: {
generateContentConfig: {
thinkingConfig: {
includeThoughts: true,
},
temperature: 1,
topP: 0.95,
topK: 64,
},
},
},
@@ -66,7 +73,7 @@ export const DEFAULT_MODEL_CONFIGS: ModelConfigServiceConfig = {
},
},
'gemini-3-flash-preview': {
extends: 'chat-base-3',
extends: 'chat-base-no-thinking',
modelConfig: {
model: 'gemini-3-flash-preview',
},
@@ -78,13 +85,13 @@ export const DEFAULT_MODEL_CONFIGS: ModelConfigServiceConfig = {
},
},
'gemini-2.5-flash': {
extends: 'chat-base-2.5',
extends: 'chat-base-no-thinking',
modelConfig: {
model: 'gemini-2.5-flash',
},
},
'gemini-2.5-flash-lite': {
extends: 'chat-base-2.5',
extends: 'chat-base-no-thinking',
modelConfig: {
model: 'gemini-2.5-flash-lite',
},
@@ -96,6 +96,10 @@ export async function getInitialChatHistory(
role: 'user',
parts: [{ text: envContextString }],
},
{
role: 'model',
parts: [{ text: 'Understood. I am ready.' }],
},
...(extraHistory ?? []),
];
}
+5 -2
View File
@@ -11,7 +11,10 @@ import { join, dirname } from 'node:path';
import { fileURLToPath } from 'node:url';
import { env } from 'node:process';
import { setTimeout as sleep } from 'node:timers/promises';
import { DEFAULT_GEMINI_MODEL, GEMINI_DIR } from '@google/gemini-cli-core';
import {
GEMINI_DIR,
PREVIEW_GEMINI_FLASH_MODEL,
} from '@google/gemini-cli-core';
export { GEMINI_DIR };
import * as pty from '@lydell/node-pty';
import stripAnsi from 'strip-ansi';
@@ -457,7 +460,7 @@ export class TestRig {
...(env['GEMINI_TEST_TYPE'] === 'integration'
? {
model: {
name: DEFAULT_GEMINI_MODEL,
name: PREVIEW_GEMINI_FLASH_MODEL,
},
}
: {}),
File diff suppressed because one or more lines are too long