Skip to content

Handle Cerebras reasoning replay fields#2

Merged
lalalune merged 6 commits into
devfrom
nubs/cerebras-reasoning-replay-clean-20260515
May 16, 2026
Merged

Handle Cerebras reasoning replay fields#2
lalalune merged 6 commits into
devfrom
nubs/cerebras-reasoning-replay-clean-20260515

Conversation

@NubsCarson
Copy link
Copy Markdown
Member

Summary

  • strip Cerebras/OpenAI-compatible reasoning_content and reasoning_details replay fields before sending prior assistant messages back to Cerebras-compatible endpoints
  • preserve useful reasoning context by folding replayed reasoning into assistant text instead of dropping it entirely
  • keep DeepSeek/Kimi/GLM-style reasoning replay behavior for providers that accept those fields
  • add coverage for native Cerebras, custom OpenAI-compatible Cerebras base URLs, gpt-oss reasoning replay, and serialized top-level reasoning replay

This is the OpenCode-side fix needed for the gpt-oss/Cerebras sub-agent path validated in elizaOS/eliza#7716. Eliza should continue to use the vendored OpenCode source; no fork-only submodule pointer was added to the Eliza PR.

Verification

Run in packages/opencode:

  • bun test test/provider/transform.test.ts test/provider/provider.test.ts --timeout 30000 — 309 pass, 0 fail, 600 assertions
  • bun run typecheck
  • git diff --check origin/dev...HEAD
  • hygiene scan over the PR diff for personal paths/domains, secrets placeholders, debug logs, and hack markers returned no matches

Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 15, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 67e66024-023c-4198-96d8-3cf2031a1fcb

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch nubs/cerebras-reasoning-replay-clean-20260515

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@lalalune lalalune merged commit 8a86b58 into dev May 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants