mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-06 04:35:00 +00:00
copy
This commit is contained in:
parent
e76bd89bc1
commit
9348a10aaf
2 changed files with 8 additions and 7 deletions
|
@ -521,7 +521,8 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
||||||
if args.show_model_warnings:
|
if args.show_model_warnings:
|
||||||
problem = models.sanity_check_models(io, main_model)
|
problem = models.sanity_check_models(io, main_model)
|
||||||
if problem:
|
if problem:
|
||||||
io.tool_output("You can skip this sanity check with --no-show-model-warnings")
|
io.tool_output("You can skip this check with --no-show-model-warnings")
|
||||||
|
io.tool_output()
|
||||||
try:
|
try:
|
||||||
if not io.confirm_ask("Proceed anyway?"):
|
if not io.confirm_ask("Proceed anyway?"):
|
||||||
return 1
|
return 1
|
||||||
|
|
|
@ -742,11 +742,11 @@ def sanity_check_model(io, model):
|
||||||
|
|
||||||
if model.missing_keys:
|
if model.missing_keys:
|
||||||
show = True
|
show = True
|
||||||
io.tool_warning(f"Model {model}: Environment variables status:")
|
io.tool_warning(f"Warning: {model} expects these environment variables")
|
||||||
for key in model.missing_keys:
|
for key in model.missing_keys:
|
||||||
value = os.environ.get(key, "")
|
value = os.environ.get(key, "")
|
||||||
status = "✓ Set" if value else "✗ Not set"
|
status = "✓ Set" if value else "✗ Not set"
|
||||||
io.tool_warning(f"- {key}: {status}")
|
io.tool_output(f"- {key}: {status}")
|
||||||
|
|
||||||
if platform.system() == "Windows" or True:
|
if platform.system() == "Windows" or True:
|
||||||
io.tool_output(
|
io.tool_output(
|
||||||
|
@ -756,12 +756,12 @@ def sanity_check_model(io, model):
|
||||||
|
|
||||||
elif not model.keys_in_environment:
|
elif not model.keys_in_environment:
|
||||||
show = True
|
show = True
|
||||||
io.tool_output(f"Model {model}: Unknown which environment variables are required.")
|
io.tool_warning(f"Warning for {model}: Unknown which environment variables are required.")
|
||||||
|
|
||||||
if not model.info:
|
if not model.info:
|
||||||
show = True
|
show = True
|
||||||
io.tool_output(
|
io.tool_warning(
|
||||||
f"Model {model}: Unknown context window size and costs, using sane defaults."
|
f"Warning for {model}: Unknown context window size and costs, using sane defaults."
|
||||||
)
|
)
|
||||||
|
|
||||||
possible_matches = fuzzy_match_models(model.name)
|
possible_matches = fuzzy_match_models(model.name)
|
||||||
|
@ -771,7 +771,7 @@ def sanity_check_model(io, model):
|
||||||
io.tool_output(f"- {match}")
|
io.tool_output(f"- {match}")
|
||||||
|
|
||||||
if show:
|
if show:
|
||||||
io.tool_output(f"For more info, see: {urls.model_warnings}\n")
|
io.tool_output(f"For more info, see: {urls.model_warnings}")
|
||||||
|
|
||||||
return show
|
return show
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue