Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aider is not reading .aider.model.metadata.json after updating to 0.72.1 #2928

Open
ericc-ch opened this issue Jan 21, 2025 · 2 comments · May be fixed by #3112
Open

Aider is not reading .aider.model.metadata.json after updating to 0.72.1 #2928

ericc-ch opened this issue Jan 21, 2025 · 2 comments · May be fixed by #3112
Labels
bug Something isn't working

Comments

@ericc-ch
Copy link

ericc-ch commented Jan 21, 2025

Issue

Aider is currently not reading the model metadata correctly, there was no issue in v0.71.1

Output from aider -v

Image

Content of my .aider.model.metadata.json

{
  "openai/claude-3.5-sonnet": {
    "max_input_tokens": 200000,
    "max_output_tokens": 8192,
    "input_cost_per_token": 0.000003,
    "output_cost_per_token": 0.000015,
    "litellm_provider": "openai",
    "mode": "chat",
    "supports_system_messages": true,
    "supports_function_calling": true,
    "supports_vision": false,
    "supports_assistant_prefill": true
  },
  "openai/gpt-4o-mini": {
    "max_input_tokens": 12288,
    "max_output_tokens": 16384,
    "input_cost_per_token": 0.00000015,
    "output_cost_per_token": 0.0000006,
    "input_cost_per_token_batches": 0.000000075,
    "output_cost_per_token_batches": 0.0000003,
    "litellm_provider": "openai",
    "mode": "chat",
    "supports_system_messages": true,
    "supports_function_calling": true,
    "supports_vision": false
  }
}

Model settings seem to be loaded just fine

Image

More of my config

Config File (/home/erickc/.aider.conf.yml):
  model:             openai/claude-3.5-sonnet
  openai-api-key:    ...-api
  openai-api-base:   http://localhost:4141/
  api-key:           [HIDDEN]
  weak-model:        openai/gpt-4o-mini
  editor-model:      openai/claude-3.5-sonnet
  show-model-warnings:False
  map-tokens:        2048
  dark-mode:         True
  auto-commits:      False
  dirty-commits:     False
  attribute-author:  False
  attribute-committer:False
  read:              ['~/.aider/conventions/general.md', '~/.aider/conventions/typescript.md']
  yes-always:        True
Defaults:
  --set-env:         []
  --model-settings-file:.aider.model.settings.yml
  --model-metadata-file:.aider.model.metadata.json
  --cache-keepalive-pings:0
  --map-refresh:     auto
  --map-multiplier-no-files:2
  --input-history-file:/home/erickc/Documents/projects/work/voyage/.aider.input.history
  --chat-history-file:/home/erickc/Documents/projects/work/voyage/.aider.chat.history.md
  --user-input-color:#00cc00
  --tool-error-color:#FF2222
  --tool-warning-color:#FFA500
  --assistant-output-color:#0088ff
  --code-theme:      default
  --aiderignore:     /home/erickc/Documents/projects/work/voyage/.aiderignore
  --lint-cmd:        []
  --test-cmd:        []
  --voice-format:    wav
  --voice-language:  en
  --encoding:        utf-8
  --line-endings:    platform
  --env-file:        /home/erickc/Documents/projects/work/voyage/.env

Version and model info

Aider v0.72.1
Main model: openai/claude-3.5-sonnet with diff edit format
Weak model: openai/gpt-4o-mini
Git repo: .git with 1,006 files
Warning: For large repos, consider using --subtree-only and .aiderignore
See: https://aider.chat/docs/faq.html#can-i-use-aider-in-a-large-mono-repo
Repo-map: using 2048 tokens, auto refresh
Added ../../../../.aider/conventions/typescript.md to the chat (read-only).
Added ../../../../.aider/conventions/general.md to the chat (read-only).

@paul-gauthier paul-gauthier added the bug Something isn't working label Jan 21, 2025
@scosenza
Copy link

I just noticed the same bug using model openai/claude-3-5-sonnet-20241022-v2:0 and:

{
  "openai/claude-3-5-sonnet-20241022-v2:0": {
    "max_tokens": 8192,
    "max_input_tokens": 200000,
    "max_output_tokens": 8192,
    "input_cost_per_token": 3e-06,
    "cache_creation_input_token_cost": 3.75e-06,
    "cache_read_input_token_cost": 3e-07,
    "output_cost_per_token": 1.5e-05,
    "litellm_provider": "openai",
    "mode": "chat",
    "supported_openai_params": [
      "stream",
      "stop",
      "temperature",
      "top_p",
      "max_tokens",
      "max_completion_tokens",
      "tools",
      "tool_choice",
      "extra_headers",
      "parallel_tool_calls",
      "response_format"
    ],
    "supports_vision": true,
    "supports_function_calling": true,
    "supports_assistant_prefill": true,
    "supports_prompt_caching": true
  }
}

@mr-september
Copy link

Is this the same underlying cause of aider not generating/using repo maps?

I am getting "No repository map available." with DeepSeek, although https://github.com/Aider-AI/aider/blob/main/aider/models.py says use_repo_map=True.

Similar to issue #869.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants