Skip to content

fix: don't hardcode obsolete model for opencode agent#260

Closed
midnattsol wants to merge 0 commit intoroborev-dev:mainfrom
midnattsol:main
Closed

fix: don't hardcode obsolete model for opencode agent#260
midnattsol wants to merge 0 commit intoroborev-dev:mainfrom
midnattsol:main

Conversation

@midnattsol
Copy link
Contributor

  • Remove hardcoded opencode/minimax-m2.1-free model which is obsolete
  • Only pass --model flag when explicitly configured by user
  • Let OpenCode use its own default model

Fixes #259

@roborev-ci
Copy link

roborev-ci bot commented Feb 14, 2026

roborev: Combined Review

Verdict: ✅ No Medium/High/Critical issues identified in commit bc5e009.

Findings (Medium+)

No findings at Critical, High, or Medium severity after deduplicating all review outputs.


Synthesized from 4 reviews (agents: codex, gemini | types: security, default)

@wesm
Copy link
Collaborator

wesm commented Feb 15, 2026

I tried pushing to your main branch but made a mess, I'll open a new PR I can control!

wesm added a commit that referenced this pull request Feb 15, 2026
## Summary

- Remove hardcoded `opencode/minimax-m2.1-free` model which is obsolete
- Only pass `--model` flag when explicitly configured by user
- Add tests for `CommandLine()` and `Review()` verifying `--model` is
omitted when empty and present when set
- Fix flaky `TestWorkerPoolCancelRunningJob` by initializing test dirs
as real git repos with real commit SHAs, so prompt building succeeds and
the job reaches the agent's `Review()` where cancellation can reliably
fire

Original fix by @midnattsol (supersedes #260). Test coverage added per
review feedback.

Fixes #259

## Test plan

- [x] `TestOpenCodeModelFlag` — verifies `CommandLine()` string output
- [x] `TestOpenCodeReviewModelFlag` — verifies actual subprocess args
via `mockAgentCLI`
- [x] Existing `TestOpenCodeReviewFiltersToolCallLines` still passes
- [x] `TestWorkerPoolCancelRunningJob` passes consistently under `-race
-count=10`
- [x] `TestWorkerPoolE2E` and `TestWorkerPoolConcurrency` now exercise
the full prompt-build → agent-review path

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: midnattsol <juanjo@delasheras.dev>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
hughdbrown pushed a commit to hughdbrown/roborev that referenced this pull request Feb 16, 2026
…-dev#264)

## Summary

- Remove hardcoded `opencode/minimax-m2.1-free` model which is obsolete
- Only pass `--model` flag when explicitly configured by user
- Add tests for `CommandLine()` and `Review()` verifying `--model` is
omitted when empty and present when set
- Fix flaky `TestWorkerPoolCancelRunningJob` by initializing test dirs
as real git repos with real commit SHAs, so prompt building succeeds and
the job reaches the agent's `Review()` where cancellation can reliably
fire

Original fix by @midnattsol (supersedes roborev-dev#260). Test coverage added per
review feedback.

Fixes roborev-dev#259

## Test plan

- [x] `TestOpenCodeModelFlag` — verifies `CommandLine()` string output
- [x] `TestOpenCodeReviewModelFlag` — verifies actual subprocess args
via `mockAgentCLI`
- [x] Existing `TestOpenCodeReviewFiltersToolCallLines` still passes
- [x] `TestWorkerPoolCancelRunningJob` passes consistently under `-race
-count=10`
- [x] `TestWorkerPoolE2E` and `TestWorkerPoolConcurrency` now exercise
the full prompt-build → agent-review path

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: midnattsol <juanjo@delasheras.dev>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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.

OpenCode agent hardcodes obsolete MiniMax model

2 participants

Comments