@@ -28,6 +28,7 @@ import glob
2828import base64
2929import mimetypes
3030import socket
31+ import ssl
3132
3233# Try to use PyYAML if available, otherwise use minimal parser
3334try :
@@ -49,6 +50,7 @@ CONFIG_KEYS = {
4950 "openai_base_url" , "openai_api_base" , "cache" , "cache_dir" ,
5051 "safe_yes" , "verbose" , "anthropic_api_key" , "openai_api_key" ,
5152 "google_api_key" , "openrouter_api_key" , "chat" , "chat_history" , "history_file" , "timeout" ,
53+ "insecure" ,
5254}
5355
5456PROVIDERS = {
@@ -176,6 +178,8 @@ def init_config(args):
176178 for key , value in args .overrides .items ():
177179 args_dict [normalize_key (key )] = value
178180 CONFIG ["args" ] = args_dict
181+ if get_conf ("insecure" ):
182+ ssl ._create_default_https_context = ssl ._create_unverified_context
179183
180184
181185def get_timeout ():
@@ -623,6 +627,8 @@ def parse_args(args):
623627 help = "Interactive chat mode: prompt for input after each response" )
624628 parser .add_argument ("--timeout" , type = float , metavar = "SECONDS" ,
625629 help = "LLM request timeout in seconds" )
630+ parser .add_argument ("--insecure" , action = "store_true" ,
631+ help = "Disable TLS certificate verification" )
626632 parser .add_argument ("--read" , "--file" , action = "append" , default = [],
627633 metavar = "FILE" ,
628634 help = "Read file(s) into context (supports globs)" )
0 commit comments