Cuppy ignores custom context window limits in BYOK settings, leading to unexpected token costs

Description: When configuring a custom model under BYOK (Bring Your Own Key), I explicitly set the Context Window to 512,000 and the Max Output to 128,000.

However, during active sessions in the Cuppy chat window, Cuppy ignores the user-defined context window limit and instead defaults to the model provider’s official maximum context window.

Expected Behavior: Cuppy should respect the custom context window configured in BYOK and automatically trigger context compression/pruning once the conversation reaches the user-defined limit (512,000 tokens).

Actual Behavior: Cuppy bypasses the custom threshold and allows the context to expand up to the model provider’s official maximum default without compressing.

Impact: Because upstream model providers utilize tiered pricing based on active context length (e.g., higher rates for larger token tiers), ignoring the custom context limit results in significant, unexpected API expenses.

Hi @OtakuSay ,

Thanks for the detailed report — we’ve logged it and are looking into it.