@@ -26,6 +26,10 @@ def default_provider() -> str:
2626 return "anthropic"
2727 elif os .environ .get ("GEMINI_API_KEY" ):
2828 return "google"
29+ elif os .environ .get ("OLLAMA_API_KEY" ):
30+ return "ollama"
31+ elif os .environ .get ("VLLM_API_KEY" ):
32+ return "vllm"
2933 else :
3034 # If nothing found, fallback and warn
3135 console .print ("[bold yellow]⚠️ No API key found. Defaulting to OpenAI (if set later).[/bold yellow]" )
@@ -47,8 +51,9 @@ def default_model() -> str:
4751@click .option ('--output' , type = click .Path (), help = 'Output file path (optional)' )
4852@click .option ('--format' , type = click .Choice (['text' , 'json' , 'markdown' ]), default = 'text' , help = 'Output format' )
4953@click .option ('--interactive' , '-i' , is_flag = True , help = 'Run in interactive mode' )
50- @click .option ('--debug_mode' , help = 'Run all agents in debug mode, don\' t use in production' )
51- def run (log_file , provider , model , query , output , format , interactive , debug_mode ):
54+ @click .option ('--debug_mode' , type = bool , help = 'Run all agents in debug mode, don\' t use in production' )
55+ @click .option ('--reasoning_enabled' , type = bool , help = 'Run all agents in debug mode, don\' t use in production' )
56+ def run (log_file , provider , model , query , output , format , interactive , debug_mode , reasoning_enabled ):
5257 """Run the DevOps agent with specified options"""
5358
5459 if not provider :
@@ -59,9 +64,9 @@ def run(log_file, provider, model, query, output, format, interactive, debug_mod
5964 console .print ("[yellow]No model specified, defaulting to gpt-4o[/yellow]" )
6065 provider = default_model ()
6166
62- # Interactive mode
67+ # Interactive mode
6368 if interactive :
64- run_interactive_mode (provider , model , output , format , debug_mode )
69+ run_interactive_mode (provider , model , output , format , debug_mode , reasoning_enabled )
6570 return
6671
6772 # Single query mode (original behavior)
@@ -83,7 +88,7 @@ def run(log_file, provider, model, query, output, format, interactive, debug_mod
8388 try :
8489 file_path = Path (__file__ ).parent .joinpath (log_file )
8590 response = execute_log_analysis_agent (provider = provider , model = model , log_file = file_path ,
86- debug_mode = debug_mode )
91+ debug_mode = debug_mode , reasoning = reasoning_enabled )
8792 console .print (Panel .fit (
8893 f"[bold yellow]Assistant:[/bold yellow] [dim]{ response } [/dim]" ,
8994 border_style = "yellow"
@@ -97,10 +102,11 @@ def run(log_file, provider, model, query, output, format, interactive, debug_mod
97102 console .print (f"\n [red]Error:[/red] { str (e )} " )
98103
99104 if query :
100- process_query (provider , query , output , format , debug_mode )
105+ process_query (provider , query , output , format , debug_mode , reasoning_enabled )
101106
102107
103- def run_interactive_mode (provider : str , model : str , output : str = None , format : str = 'text' , debug_mode : bool = False ):
108+ def run_interactive_mode (provider : str , model : str , output : str = None , format : str = 'text' ,
109+ debug_mode : bool = False , reasoning_enabled : bool = False ):
104110 """Run the agent in interactive mode with continuous conversation"""
105111
106112 console .print (Panel .fit (
@@ -133,7 +139,7 @@ def run_interactive_mode(provider: str, model: str, output: str = None, format:
133139
134140 try :
135141 response = execute_master_agent (provider = provider , model_str = model , user_query = user_input ,
136- debug_mode = debug_mode )
142+ debug_mode = debug_mode , reasoning = reasoning_enabled )
137143 console .print (Panel .fit (
138144 f"[bold yellow]Assistant:[/bold yellow] [dim]{ response } [/dim]" ,
139145 border_style = "yellow"
@@ -156,7 +162,7 @@ def run_interactive_mode(provider: str, model: str, output: str = None, format:
156162
157163
158164def process_query (provider : str , model : str , query : str , output : str = None , format : str = 'text' ,
159- debug_mode : bool = False ):
165+ debug_mode : bool = False , reasoning_enabled : bool = False ):
160166 """Process a single query"""
161167 console .print (f"[yellow]Processing query:[/yellow] { query } " )
162168 console .print (Panel .fit (
@@ -165,7 +171,8 @@ def process_query(provider: str, model: str, query: str, output: str = None, for
165171 ))
166172
167173 try :
168- response = execute_master_agent (provider = provider , model_str = model , user_query = query , debug_mode = debug_mode )
174+ response = execute_master_agent (provider = provider , model_str = model , user_query = query ,
175+ debug_mode = debug_mode , reasoning = reasoning_enabled )
169176 console .print (Panel .fit (
170177 f"[bold yellow]Assistant:[/bold yellow] [dim]{ response } [/dim]" ,
171178 border_style = "yellow"
0 commit comments