[PR #2842] Filter unsupported Cerebras options #10456

Closed
opened 2026-02-16 18:15:06 -05:00 by yindo · 0 comments
Owner

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

State: closed
Merged: No


Ensures we don’t pass the unsupported options field to the Cerebras OpenAI-compatible
API. Their backend rejects requests containing that field, which previously surfaced as
AI_APICallError: body.options in opencode.

Changes:

  • packages/opencode/src/session/prompt.ts: just before calling streamText, detect the
    provider key and, for Cerebras, strip any options property from params.options. Rebuild
    a providerOptions object only when something remains.
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/2842 **State:** closed **Merged:** No --- Ensures we don’t pass the unsupported options field to the Cerebras OpenAI-compatible API. Their backend rejects requests containing that field, which previously surfaced as `AI_APICallError: body.options` in opencode. Changes: - `packages/opencode/src/session/prompt.ts`: just before calling streamText, detect the provider key and, for Cerebras, strip any options property from `params.options`. Rebuild a `providerOptions` object only when something remains.
yindo added the pull-request label 2026-02-16 18:15:06 -05:00
yindo closed this issue 2026-02-16 18:15:06 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#10456