|
| 1 | +# Case Study: Replace Deprecated qwen3.6-plus-free Default with nemotron-3-super-free |
| 2 | + |
| 3 | +**Issue:** [#242](https://github.com/link-assistant/agent/issues/242) |
| 4 | +**PR:** [#243](https://github.com/link-assistant/agent/pull/243) |
| 5 | + |
| 6 | +## Problem Statement |
| 7 | + |
| 8 | +OpenCode Zen ended the free promotion for `qwen3.6-plus-free` (Qwen 3.6 Plus Free). The model now requires an OpenCode Go subscription. Since `qwen3.6-plus-free` was the default model for the agent, all users without an OpenCode Go subscription experienced immediate failures when running the agent without specifying an alternative model. |
| 9 | + |
| 10 | +## Timeline of Events |
| 11 | + |
| 12 | +| Timestamp (UTC) | Event | |
| 13 | +| ---------------------- | --------------------------------------------------------------------------------------------- | |
| 14 | +| April 2026 (early) | `qwen3.6-plus-free` set as default model in [PR #234](https://github.com/link-assistant/agent/pull/234) (issue #232) | |
| 15 | +| ~April 9, 2026 | OpenCode Zen ends free promotion for Qwen 3.6 Plus Free | |
| 16 | +| 2026-04-09T09:10:31Z | Agent run fails with `ModelError`: "Free promotion has ended for Qwen3.6 Plus Free" | |
| 17 | +| 2026-04-09T09:10:31Z | Compaction cascade also fails: `ProviderModelNotFoundError` for `qwen3.6-plus-free` | |
| 18 | +| 2026-04-09T09:10:31Z | Available free models at time of failure: `big-pickle`, `gpt-5-nano`, `nemotron-3-super-free` | |
| 19 | + |
| 20 | +## Root Cause Analysis |
| 21 | + |
| 22 | +### Primary Cause: External model deprecation |
| 23 | + |
| 24 | +OpenCode Zen removed `qwen3.6-plus-free` from the free tier. The API now returns HTTP 401 with: |
| 25 | + |
| 26 | +```json |
| 27 | +{ |
| 28 | + "type": "error", |
| 29 | + "error": { |
| 30 | + "type": "ModelError", |
| 31 | + "message": "Free promotion has ended for Qwen3.6 Plus Free. You can continue using the model by subscribing to OpenCode Go - https://opencode.ai/go" |
| 32 | + } |
| 33 | +} |
| 34 | +``` |
| 35 | + |
| 36 | +### Secondary Impact: Compaction cascade failure |
| 37 | + |
| 38 | +The default compaction models cascade included `qwen3.6-plus-free` as the largest-context model: |
| 39 | +``` |
| 40 | +(big-pickle nemotron-3-super-free minimax-m2.5-free gpt-5-nano qwen3.6-plus-free same) |
| 41 | +``` |
| 42 | + |
| 43 | +When the model was removed, the cascade gracefully skipped it (`"skipping unresolvable compaction model in cascade"`), but the configuration was still referencing a non-existent model. |
| 44 | + |
| 45 | +### Tertiary Impact: Provider priority lists |
| 46 | + |
| 47 | +`qwen3.6-plus-free` was listed first in: |
| 48 | +- `getSmallModel()` OpenCode priority list (used for title/summary generation) |
| 49 | +- Global model sort priority list |
| 50 | + |
| 51 | +## Evidence from Logs |
| 52 | + |
| 53 | +Source: [solution-draft-log.txt](solution-draft-log.txt) (full log from failed run on 2026-04-09) |
| 54 | + |
| 55 | +**Key log entries:** |
| 56 | + |
| 57 | +1. **Model resolution succeeds** (line 648): Model resolves to `qwen3.6-plus-free` via default |
| 58 | +2. **Model not in catalog** (line 657): `"model not found - refusing to silently fallback"` — `qwen3.6-plus-free` no longer in available models list |
| 59 | +3. **Compaction cascade skip** (line 665): `"error": "ProviderModelNotFoundError"` for `qwen3.6-plus-free` |
| 60 | +4. **API error** (line 1679): `"Free promotion has ended for Qwen3.6 Plus Free"` |
| 61 | +5. **HTTP 401** (line 1692): `"status": 401, "statusText": "Unauthorized"` |
| 62 | + |
| 63 | +## Available Free Models (Post-Deprecation) |
| 64 | + |
| 65 | +From the log at time of failure (line 649-656): |
| 66 | + |
| 67 | +| Model | Provider | Context | Status | |
| 68 | +| ---------------------- | -------- | ---------- | -------------------------- | |
| 69 | +| big-pickle | opencode | ~200,000 | Available | |
| 70 | +| gpt-5-nano | opencode | ~400,000 | Available | |
| 71 | +| nemotron-3-super-free | opencode | ~262,144 | Available | |
| 72 | +| glm-5-free | kilo | ~202,752 | Available | |
| 73 | +| glm-4.5-air-free | kilo | ~131,072 | Available | |
| 74 | +| minimax-m2.5-free | kilo | ~204,800 | Available (Kilo only) | |
| 75 | +| qwen3.6-plus-free | opencode | ~1,000,000 | **Deprecated (paid only)** | |
| 76 | + |
| 77 | +## Solution |
| 78 | + |
| 79 | +### New Default Model: `opencode/nemotron-3-super-free` |
| 80 | + |
| 81 | +**Rationale:** Among remaining free OpenCode models, `nemotron-3-super-free` has the largest context window (~262K tokens) and strong reasoning capabilities (NVIDIA hybrid Mamba-Transformer architecture). While `gpt-5-nano` has a larger context (~400K), `nemotron-3-super-free` is better suited as a primary model due to its stronger general-purpose agent performance. |
| 82 | + |
| 83 | +### Changes Made |
| 84 | + |
| 85 | +1. **`js/src/cli/defaults.ts`**: Changed `DEFAULT_MODEL` from `opencode/qwen3.6-plus-free` to `opencode/nemotron-3-super-free` |
| 86 | +2. **`js/src/cli/defaults.ts`**: Removed `qwen3.6-plus-free` from compaction models cascade |
| 87 | +3. **`js/src/provider/provider.ts`**: Updated `getSmallModel()` and global sort priority lists — removed `qwen3.6-plus-free` |
| 88 | +4. **`js/src/cli/argv.ts`**: Updated compaction models comment |
| 89 | +5. **Documentation**: Moved `qwen3.6-plus-free` to deprecated/discontinued sections in FREE_MODELS.md, MODELS.md, README.md |
| 90 | +6. **Tests**: Updated assertions for new default model and cascade |
| 91 | + |
| 92 | +### Updated Compaction Models Cascade |
| 93 | + |
| 94 | +``` |
| 95 | +Old: (big-pickle nemotron-3-super-free minimax-m2.5-free gpt-5-nano qwen3.6-plus-free same) |
| 96 | +New: (big-pickle minimax-m2.5-free nemotron-3-super-free gpt-5-nano same) |
| 97 | +``` |
| 98 | + |
| 99 | +Note: `nemotron-3-super-free` is now the default model, so `same` at the end of the cascade effectively includes it. The cascade order remains smallest-to-largest context. |
| 100 | + |
| 101 | +## Lessons Learned |
| 102 | + |
| 103 | +1. **Free model promotions are temporary** — The agent should be resilient to model deprecation. This is the fourth time a default free model has been deprecated (grok-code → kimi-k2.5-free → minimax-m2.5-free → qwen3.6-plus-free). |
| 104 | +2. **Compaction cascade provides resilience** — The cascade correctly skipped the unavailable model and continued with available alternatives, preventing total compaction failure. |
| 105 | +3. **Verbose logging was critical** — The detailed HTTP response body logging (added in previous PRs) immediately revealed the exact error message from OpenCode Zen. |
| 106 | + |
| 107 | +## Related Issues and PRs |
| 108 | + |
| 109 | +- [Issue #232](https://github.com/link-assistant/agent/issues/232) — Original PR that set `qwen3.6-plus-free` as default |
| 110 | +- [Issue #208](https://github.com/link-assistant/agent/issues/208) — Previous default model deprecation (`kimi-k2.5-free`) |
| 111 | +- [Issue #133](https://github.com/link-assistant/agent/issues/133) — First default model deprecation (`grok-code`) |
0 commit comments