-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
Prerequisites
- I have checked the latest version of the plugin
- I have searched for existing issues with the same problem
- I have read the documentation
- I am writing this issue in English
Bug Description
Two tests in src/plugin/event.model-fallback.test.ts fail on the dev branch. The chatMessageHandler returned by createEventHandler does not write the fallback model to output.message["model"] after applying a model fallback. The abort + re-prompt logic works correctly, but the model override is not reflected in the output object.
Steps to Reproduce
- Check out the
devbranch - Run
bun test src/plugin/event.model-fallback.test.ts - Observe 2 test failures out of 5
Expected Behavior
All 5 tests pass. After applying a model fallback, output.message["model"] should contain the fallback model (e.g., { providerID: "anthropic", modelID: "claude-opus-4-6" }).
Actual Behavior
output.message["model"] is undefined after fallback is applied. The failing tests:
triggers retry prompt on session.status retry events and applies fallbackadvances main-session fallback chain across repeated session.error retries end-to-end
Error output:
```
expect(output.message["model"]).toEqual({
providerID: "anthropic",
modelID: "claude-opus-4-6",
})
Expected: { providerID: "anthropic", modelID: "claude-opus-4-6" }
Received: undefined
```
Doctor Output
```
oMoMoMoMo Doctor
⚠ 3 issues found:
-
Loaded plugin is outdated
Loaded 3.8.3, latest 3.10.1.
Fix: Update: cd ~/.config/opencode && bun update oh-my-opencode
Affects: plugin features -
Model override uses unavailable provider
Provider(s) not found in OpenCode model cache: INTSIG_claude, INTSIG_openai, INTSIG_google
Affects: model resolution -
Comment checker unavailable
Comment checker binary is not installed.
Fix: Install @code-yeongyu/comment-checker
Affects: comment-checker hook
```
Operating System
macOS
OpenCode Version
1.2.20
Additional Context
These failures are reproducible on a clean checkout of the dev branch with no local configuration. The test file was not recently modified — the failures appear to be a regression from changes to the event handler or model fallback logic.