fix: Adjust streaming settings before creating Coder object

This commit is contained in:
Paul Gauthier (aider) 2024-09-12 14:49:21 -07:00
parent 99a75ac213
commit 859fc1f184

View file

@ -576,15 +576,14 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
if args.cache_prompts and args.map_refresh == "auto":
args.map_refresh = "files"
try:
if not main_model.streaming:
if args.stream:
io.tool_warning(
"Warning: Streaming is not supported by the selected model. Disabling"
" streaming."
)
args.stream = False
if not main_model.streaming:
if args.stream:
io.tool_warning(
"Warning: Streaming is not supported by the selected model. Disabling streaming."
)
args.stream = False
try:
coder = Coder.create(
main_model=main_model,
edit_format=args.edit_format,