Added
- Dynamic OpenRouter free model discovery -- fetches live free models from OpenRouter API at startup; replaces static list with fresh data so new free models appear automatically without code updates. Falls back to cached static list with a yellow warning on network failure.
formatCtxWindowandlabelFromIdutility functions -- extracted tolib/utils.jsfor testability; used by dynamic OpenRouter discovery to convert API data to display format.- 16 new unit tests -- covering
formatCtxWindow,labelFromId, and MODELS array mutation logic (147 total tests across 23 suites). - NVIDIA NIM auto-configuration -- selecting a NIM model in OpenCode now auto-creates the nvidia provider block in
opencode.jsonif missing, eliminating the manual install prompt.
Fixed
- Auto-update infinite loop -- when running from source (dev mode with
.gitdirectory), auto-update is now skipped to prevent the restart loop where LOCAL_VERSION never changes. - NVIDIA model double-prefix bug -- model IDs in
sources.jsalready includenvidia/prefix;getOpenCodeModelId()now strips it for nvidia provider (like it does for zai), preventingnvidia/nvidia/...in OpenCode config.
Removed
checkNvidiaNimConfig()function -- replaced by auto-create pattern; dead code removed.