Skip to content

Aider with Fireworks and DeepSeek-R1-0528 mid-thinking cutoff issue

R1-0528 should have enough token context but it kept stop thinking midway for me.

It's when I use aider:

Model fireworks_ai/accounts/fireworks/models/deepseek-r1-0528 has hit a token limit!
Token counts below are approximate.

Input tokens: ~3,025 of 160,000
Output tokens: ~2,041 of 160,000
Total tokens: ~5,066 of 160,000

Solution: edit ~/.aider.model.settings.yml.

- name: fireworks_ai/accounts/fireworks/models/deepseek-r1-0528
  edit_format: diff
  weak_model_name: fireworks_ai/accounts/fireworks/models/deepseek-v3-0324
  use_repo_map: true
  extra_params:
    max_tokens: 160000
  use_temperature: false
  editor_model_name: fireworks_ai/accounts/fireworks/models/deepseek-v3-0324
  editor_edit_format: editor-diff
  reasoning_tag: think

Inspired by https://aider.chat/docs/config/reasoning.html