Skip to content

Add Cerebras Models#161

Open
lazyplatypus wants to merge 1 commit into
joelhooks:mainfrom
lazyplatypus:main
Open

Add Cerebras Models#161
lazyplatypus wants to merge 1 commit into
joelhooks:mainfrom
lazyplatypus:main

Conversation

@lazyplatypus

@lazyplatypus lazyplatypus commented Feb 2, 2026

Copy link
Copy Markdown

Added GLM 4.7 as worker/planning model.

Summary by CodeRabbit

  • New Features
    • Added Cerebras GLM 4.7 as a new model option for coordinator agent selection.
    • Added Cerebras GLM 4.7 as a new model option for worker agent selection.

@vercel

vercel Bot commented Feb 2, 2026

Copy link
Copy Markdown

@lazyplatypus is attempting to deploy a commit to the joelhooks' projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Feb 2, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Two new model options (Cerebras GLM 4.7) have been added to the coordinator and worker model selection lists in the swarm plugin configuration, extending available model choices without modifying any existing logic.

Changes

Cohort / File(s) Summary
Model Configuration
packages/opencode-swarm-plugin/bin/swarm.ts
Added Cerebras GLM 4.7 model option to both COORDINATOR_MODELS and WORKER_MODELS lists with corresponding labels and hints.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A rabbit hops with glee so bright,
New Cerebras models, sleek and light!
GLM 4.7 joins the fray,
The swarm grows smarter every day!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Add Cerebras Models' accurately reflects the main change: adding new Cerebras GLM 4.7 model options to coordinator and worker model lists.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@packages/opencode-swarm-plugin/bin/swarm.ts`:
- Around line 342-346: The new model entry ("cerebras/zai-glm-4.7" label
"Cerebras GLM 4.7") was added to the UI options but there are no tests locking
these user-facing choices; add/update tests (red → green) that assert this model
string and label appear in the model options used by both the quick-update flow
and full setup flows (e.g., the code paths that build
modelOptions/availableModels or functions named
quickUpdateFlow/getModelOptions/fullSetup) so future changes will fail the test
if the option drifts; write the failing tests first, then adjust the model
options source if needed and ensure both flows' test suites include assertions
for the value and label.
- Around line 342-346: The setup flow uses a separate hardcoded options list so
the new Cerebras model (value "cerebras/zai-glm-4.7") is missing from initial
setup; update the initial setup prompt to reuse the existing COORDINATOR_MODELS
and WORKER_MODELS arrays (or add the same object to the hardcoded lists) so the
Cerebras entry appears in first-time setup; locate the prompt option arrays in
the file (the setup prompt block where coordinator/worker model choices are
defined) and either replace the hardcoded arrays with references to
COORDINATOR_MODELS and WORKER_MODELS or insert the provided Cerebras entry into
those hardcoded lists to keep them in sync with the quick-update flow.

Comment on lines +342 to +346
{
value: "cerebras/zai-glm-4.7",
label: "Cerebras GLM 4.7",
hint: "Ultra-fast (~1000 tok/s), 131k context, reasoning model",
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Add coverage for the new model options (TDD requirement).

These are user-facing selections; please add/update tests to lock in the available options so future changes don’t drift between the quick-update flow and full setup. As per coding guidelines, Follow Test-Driven Development (TDD) for all code changes: write failing tests first (Red), write minimal code to pass (Green), then refactor (Refactor).

Also applies to: 370-374

🤖 Prompt for AI Agents
In `@packages/opencode-swarm-plugin/bin/swarm.ts` around lines 342 - 346, The new
model entry ("cerebras/zai-glm-4.7" label "Cerebras GLM 4.7") was added to the
UI options but there are no tests locking these user-facing choices; add/update
tests (red → green) that assert this model string and label appear in the model
options used by both the quick-update flow and full setup flows (e.g., the code
paths that build modelOptions/availableModels or functions named
quickUpdateFlow/getModelOptions/fullSetup) so future changes will fail the test
if the option drifts; write the failing tests first, then adjust the model
options source if needed and ensure both flows' test suites include assertions
for the value and label.

⚠️ Potential issue | 🟠 Major

Add Cerebras option to the initial setup prompts (currently only in quick update flow).

The new model is added to COORDINATOR_MODELS/WORKER_MODELS, but the full setup flow uses separate hardcoded option lists later in the file. That means first-time setup can’t pick Cerebras GLM 4.7. Consider reusing COORDINATOR_MODELS/WORKER_MODELS for those prompts (or add the same entry there) to avoid drift.

Example option entry to add to the setup prompts
{
  value: "cerebras/zai-glm-4.7",
  label: "Cerebras GLM 4.7",
  hint: "Ultra-fast (~1000 tok/s), 131k context, reasoning model",
}

Also applies to: 370-374

🤖 Prompt for AI Agents
In `@packages/opencode-swarm-plugin/bin/swarm.ts` around lines 342 - 346, The
setup flow uses a separate hardcoded options list so the new Cerebras model
(value "cerebras/zai-glm-4.7") is missing from initial setup; update the initial
setup prompt to reuse the existing COORDINATOR_MODELS and WORKER_MODELS arrays
(or add the same object to the hardcoded lists) so the Cerebras entry appears in
first-time setup; locate the prompt option arrays in the file (the setup prompt
block where coordinator/worker model choices are defined) and either replace the
hardcoded arrays with references to COORDINATOR_MODELS and WORKER_MODELS or
insert the provided Cerebras entry into those hardcoded lists to keep them in
sync with the quick-update flow.

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.

2 participants