[PR #5036] Fix/cerebras conservative max tokens #11215

Open
opened 2026-02-16 18:16:01 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/5036

State: open
Merged: No


This PR adds a specific configuration for the Cerebras provider to optimize rate limit handling and integration tracking.

Key changes:

  • Conservative Token Limit: Sets maxCompletionTokens to 16k. The Cerebras rate limiter estimates token consumption by reserving the full max_completion_tokens quota upfront. Using a conservative default prevents premature rate limiting, ensuring smoother operation even when actual generation is small.
  • Integration Header: Adds the X-Cerebras-3rd-Party-Integration: opencode` header.
  • Configuration: Sets autoload: false.

Testing:
Verified functionality with the following models: gpt-oss-120b, qwen-235, zai-glm4.6

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/5036 **State:** open **Merged:** No --- This PR adds a specific configuration for the Cerebras provider to optimize rate limit handling and integration tracking. Key changes: - Conservative Token Limit: Sets maxCompletionTokens to 16k. The Cerebras rate limiter estimates token consumption by reserving the full max_completion_tokens quota upfront. Using a conservative default prevents premature rate limiting, ensuring smoother operation even when actual generation is small. - Integration Header: Adds the X-Cerebras-3rd-Party-Integration: opencode` header. - Configuration: Sets autoload: false. Testing: Verified functionality with the following models: gpt-oss-120b, qwen-235, zai-glm4.6
yindo added the pull-request label 2026-02-16 18:16:01 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11215