paul-gauthier / aider

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

unknown model connecting with openrouter claude-3.5-sonnet #721

Closed yxd0018 closed 1 day ago

yxd0018 commented 4 days ago

Issue

aider --model openrouter/anthropic/claude-3.5-sonnet Model openrouter/anthropic/claude-3.5-sonnet: Unknown model, context window size and token costs unavailable.

Did you mean one of these?

Version and model info

Aider v0.40.0

paul-gauthier commented 3 days ago

Thanks for trying aider and filing this issue.

The model to use is openrouter/anthropic/claude-3-5-sonnet with a 3-5 not 3.5.

paul-gauthier commented 3 days ago

Sorry, you were correct. It should be openrouter/anthropic/claude-3.5-sonnet with a 3.5.

You can ignore the warning, which is what the URL it provides indicates. It's just a warning.

paul-gauthier commented 1 day 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.

ErykCh commented 23 hours ago

Error is here:

ModelSettings(
    "openrouter/anthropic/claude-3.5-sonnet",
    "diff",
    weak_model_name="openrouter/anthropic/claude-3-haiku-20240307",
    use_repo_map=True,
    examples_as_sys_msg=True,
    can_prefill=True,
),

should be

ModelSettings(
    "openrouter/anthropic/claude-3.5-sonnet",
    "diff",
    weak_model_name="openrouter/anthropic/claude-3-haiku",
    use_repo_map=True,
    examples_as_sys_msg=True,
    can_prefill=True,
),

It's strange that there is no error during operation, because there is no such model as claude-3-haiku-20240307 in Open Router, unless in this case summaries and commit texts are made via Sonnet?