App Version
3.17.0
API Provider
Anthropic
Model Used
Any OpenRouter model that has the same output tokens as the context window
🔁 Steps to Reproduce
- Select Deepseek v3 0324 from OpenRouter
- Select the GMICloud provider or any provider that serves the model with the same amount of output tokens as the context window.
- The reserved tokens will equal to the tokens of the context window leaving 0 available tokens.

💥 Outcome Summary (Optional)
The reserved tokens should be a fraction of the total context window.
📄 Additional Context
I addressed this issue on #3430 by adding a condition where if the maxToken is equal to safeContextWindow then the reserved tokens should be 20% of the total context window.
Commit: 3296bd6
CC
@cte