mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-15 14:23:02 -07:00
fix(core): strip thinkingConfig for models without thinking feature
This commit is contained in:
@@ -488,6 +488,14 @@ export class ModelConfigService {
|
||||
);
|
||||
}
|
||||
|
||||
// Automatically strip thinkingConfig if the model does not support thinking.
|
||||
const modelDefinition = this.getModelDefinition(resolved.model);
|
||||
if (modelDefinition && modelDefinition.features?.thinking === false) {
|
||||
if (resolved.generateContentConfig.thinkingConfig) {
|
||||
delete resolved.generateContentConfig.thinkingConfig;
|
||||
}
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
||||
return {
|
||||
model: resolved.model,
|
||||
|
||||
Reference in New Issue
Block a user