Answer: Create a .aider.model.metadata.json file (in your home directory, the root of your git repo, or the current directory where you launch aider, or specify a file with the --model-metadata-file switch) containing a dictionary entry for each model with fields like max_input_tokens, max_output_tokens, input_cost_per_token, and output_cost_per_token. Status: Confirmed Entry: tool/aider/models/context-window-size-token-costs Revision: 1 Digest: sha256:241cb8ff4426406c (changes whenever the content changes) Timeline: Created: 2026-11-13T02:56:08Z Last changed: 2026-11-13T02:56:08Z Last verified: 2026-11-20T11:42:02Z Next check: 2026-11-21T11:42:02Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Unit | Source | As of metadata file name | .aider.model.metadata.json | | [1] | 2026-11-20 max input tokens | 32000 | tokens | [1] | 2026-11-20 max output tokens | 4096 | tokens | [1] | 2026-11-20 input cost per token | 0.00000014 | | [1] | 2026-11-20 output cost per token | 0.00000028 | | [1] | 2026-11-20 model metadata file switch | --model-metadata-file | | [1] | 2026-11-20 Sources: [1] Aider. "aider.chat/docs/config/adv-model-settings.html". https://aider.chat/docs/config/adv-model-settings.html Role: primary. Accessed: 2026-11-20T11:42:02Z Quote: "Create a .aider.model.metadata.json file in one of these locations:" (Supports: metadata file name) Quote: ""max_input_tokens": 32000," (Supports: max input tokens) Quote: ""max_output_tokens": 4096," (Supports: max output tokens) Quote: ""input_cost_per_token": 0.00000014," (Supports: input cost per token) Quote: ""output_cost_per_token": 0.00000028," (Supports: output cost per token) Quote: "Or specify a specific file with the --model-metadata-file switch." (Supports: model metadata file switch) Published: 2026-04-25T16:45:23Z Snapshot SHA-256: 68a6056fe35d14f79a44a6097ebcd62f15c7d99d2206fe86de569e40101b9892 (captured 2026-11-13T02:56:08Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-13T02:56:08Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T11:42:02Z. No independent second source is configured for this entry Last successful check: 2026-11-20T11:42:02Z Last attempt: 2026-11-20T11:42:02Z Notes and limitations: Extracted automatically from a single official source (section "Context window size and token costs"). Related: https://latestn.com/tool/aider/models/contribute-benchmark-results How can I contribute benchmark results to Aider's code editing leaderboard? https://latestn.com/tool/aider/models/contribute-model-metadata How do I contribute model metadata to Aider? https://latestn.com/tool/aider/models/deepseek-chat-model-name Which model name do I use to run DeepSeek Chat V3 in Aider? https://latestn.com/tool/aider/models/connect-aider-to-openrouter How do I connect Aider to OpenRouter? https://latestn.com/tool/aider/models/connect-local-models How do I connect Aider to a local model? https://latestn.com/tool/aider/models/connect-openai-compatible-api How do I connect Aider to an OpenAI-compatible API? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T02:56:08Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/aider/models/context-window-size-token-costs/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/aider/models/context-window-size-token-costs POST: https://latestn.com/dispute/tool/aider/models/context-window-size-token-costs with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/aider/models/context-window-size-token-costs?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I set the context window size and token costs for an Aider model? Revision 1, last verified 2026-11-20T11:42:02Z. https://latestn.com/tool/aider/models/context-window-size-token-costs (accessed 2026-11-21T09:57:52Z). @misc{LatestN_tool_aider_models_context_window_size_token_costs_r1, title = {How do I set the context window size and token costs for an Aider model?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/aider/models/context-window-size-token-costs}}, note = {Revision 1; digest sha256:241cb8ff4426406c; last verified 2026-11-20T11:42:02Z; accessed 2026-11-21T09:57:52Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/aider/models/context-window-size-token-costs