GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Cerebras requests send both max_tokens and max_completion_tokens · Issue #43716 · anomalyco/opencode

Cerebras requests send both max_tokens and max_completion_tokens #43716

New issue
Copy link
New issue
Copy link
Closed
#43736
Closed
Cerebras requests send both max_tokens and max_completion_tokens#43716
#43736
Copy link
Assignees
neriousy

Description

@ryanl-cerebras
ryanl-cerebras
opened on Aug 20, 2026
Issue body actions

Description

When a Cerebras model is called with max_completion_tokens in provider options, OpenCode also synthesizes max_tokens from maxOutputTokens. The outgoing request contains both fields, and the Cerebras API rejects the request.

Expected behavior

When the canonical max_completion_tokens field is explicitly supplied for the native Cerebras provider, OpenCode should omit the synthesized max_tokens alias. Requests that do not supply the canonical field should retain the current maxOutputTokens behavior.

Reproduction

  1. Select a model using the @ai-sdk/cerebras provider.
  2. Supply max_completion_tokens through the provider options.
  3. Inspect the outgoing chat-completions body.
  4. Observe that both max_completion_tokens and max_tokens are present.

The same behavior occurs in both the experimental native-provider path and the normal AI SDK path.

Activity

  1. github-actions
    assigned
    neriousy
    on Aug 20, 2026
  2. rekram1-node
    closed this as completedin #43736on Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @neriousy
    neriousy

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.