feat: Display environment variables status when showing missing variables

This commit is contained in:
Paul Gauthier (aider) 2024-08-26 14:40:25 -07:00
parent 58d1b4c2ca
commit b51b5cf12d

View file

@ -728,9 +728,11 @@ def sanity_check_model(io, model):
if model.missing_keys:
show = True
io.tool_error(f"Model {model}: Missing these environment variables:")
io.tool_error(f"Model {model}: Environment variables status:")
for key in model.missing_keys:
io.tool_error(f"- {key}")
value = os.environ.get(key, '')
status = "✓ Set" if value else "✗ Not set"
io.tool_error(f"- {key}: {status}")
if platform.system() == "Windows" or True:
io.tool_output(