validateThinkingConfig method
Validate thinking configuration
This validation is now more permissive, trusting user configuration while still providing helpful warnings for obvious misconfigurations.
Implementation
String? validateThinkingConfig() {
// Only validate budget constraints, not model capabilities
// since users may know better about their specific model setup
if (thinkingBudgetTokens != null) {
if (thinkingBudgetTokens! < 1024) {
return 'Thinking budget tokens must be at least 1024, got $thinkingBudgetTokens';
}
if (thinkingBudgetTokens! > maxThinkingBudgetTokens) {
return 'Thinking budget tokens ($thinkingBudgetTokens) exceeds maximum ($maxThinkingBudgetTokens) for model $model';
}
}
return null; // Valid - trust user configuration for model capabilities
}