File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -1510,15 +1510,21 @@ def _configure_generation(
15101510 self .log .debug (
15111511 f"Using thinking_budget={ validated_budget } for model { model_id } "
15121512 )
1513- # -1 means dynamic, so we don't set thinking_budget explicitly
1513+ else :
1514+ # -1 means dynamic thinking
1515+ self .log .debug (
1516+ f"Using dynamic thinking (model decides) for model { model_id } "
1517+ )
15141518
15151519 gen_config_params ["thinking_config" ] = types .ThinkingConfig (
15161520 ** thinking_config_params
15171521 )
1518- except Exception as e :
1519- # Fall back silently if SDK/model does not support ThinkingConfig
1522+ except ( AttributeError , TypeError ) as e :
1523+ # Fall back if SDK/model does not support ThinkingConfig
15201524 self .log .debug (f"ThinkingConfig not supported: { e } " )
1521- pass
1525+ except Exception as e :
1526+ # Log unexpected errors but continue without thinking config
1527+ self .log .warning (f"Unexpected error configuring ThinkingConfig: { e } " )
15221528
15231529 # Configure safety settings
15241530 if self .valves .USE_PERMISSIVE_SAFETY :
You can’t perform that action at this time.
0 commit comments