paul-gauthier / aider

aider is AI pair programming in your terminal
https://aider.chat/
Apache License 2.0
12.56k stars 1.2k forks source link

Error to set model to openrouter/meta-llama/llama-3-8b-instruct:free #731

Closed yxd0018 closed 16 hours ago

yxd0018 commented 5 days ago

Issue

$ aider --model openrouter/meta-llama/llama-3-8b-instruct:free Traceback (most recent call last): File "/home/abc/.local/bin/aider", line 8, in sys.exit(main()) File "/home/abc/.local/lib/python3.10/site-packages/aider/main.py", line 406, in main main_model = models.Model(args.model, weak_model=args.weak_model) File "/home/abc/.local/lib/python3.10/site-packages/aider/models.py", line 331, in init if self.info.get("max_input_tokens", 0) < 32 * 1024: TypeError: '<' not supported between instances of 'NoneType' and 'int'

It's fine to connect similar model without the word "free" in the model

Version and model info

v0.40.1

Gerkinfeltser commented 5 days ago

This seems to be caused by something that changed in v0.40.1. I Tried both v0.40, which worked, then upgraded to 0.40.1 and got the same error. If this is required for you atm @yxd0018 maybe downgrade back a version or two until a fix is in.

EDIT: Further note: if you remove the :free aider will run but you'll see the following announcement text (& it won't be using the free model but this one: https://openrouter.ai/models/meta-llama/llama-3-8b-instruct ): aider --model openrouter/meta-llama/llama-3-8b-instruct --restore-chat-history --edit-format whole

...
Model openrouter/meta-llama/llama-3-8b-instruct: Unknown model, context window size and token costs unavailable.
Did you mean one of these?
- openrouter/meta-llama/llama-3-8b-instruct:free
- openrouter/meta-llama/llama-3-8b-instruct:extended
https://aider.chat/docs/llms/warnings.html
Aider v0.40.1
Model: openrouter/meta-llama/llama-3-8b-instruct with whole edit format
Git repo: none
Repo-map: disabled
Restored previous conversation history.
VSCode terminal detected, pretty output has been disabled.
Use /help to see in-chat commands, run with --help to see cmd line args
paul-gauthier commented 5 days ago

Thanks for trying aider and filing this issue.

You can ignore the warning. See the link in the output which explains this.

paul-gauthier commented 16 hours ago

I'm going to close this issue for now, but feel free to add a comment here and I will re-open or file a new issue any time.