Repository navigation
Commit a7e8a73
committed
fix(opencode): stop overwriting manual model selection on agent data refresh
Remove the createEffect that enforced the agent's default model whenever
agent state was refreshed by the server. The currentModel memo already
handles fallback correctly through its priority chain:
1. Per-agent manual selection (modelStore.model[agentName])
2. Agent configured default (agent.model)
3. Global fallback (CLI arg / config / recent)
The effect was redundant and harmful: any server sync that updated agent
data would re-trigger it, silently replacing the user's manual model
choice with the agent's default.
Fixes anomalyco#134561 parent d1482e1 commit a7e8a73
1 file changed
Lines changed: 1 addition & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
381 | 381 | | |
382 | 382 | | |
383 | 383 | | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | | - | |
400 | | - | |
401 | | - | |
402 | 384 | | |
403 | 385 | | |
404 | 386 | | |
| |||
0 commit comments