fix: use cache file for model availability instead of SDK calls

- Changed fetchAvailableModels to read from ~/.cache/opencode/models.json
- Prevents plugin startup hanging caused by SDK client.config.providers() call
- Updated doctor model-resolution check to show available models from cache
- Added cache info display: provider count, model count, refresh command
This commit is contained in:
justsisyphus
2026-01-23 14:09:37 +09:00
parent f4348885f2
commit ab3e622baa
5 changed files with 148 additions and 80 deletions
+1
View File
@@ -79,6 +79,7 @@ import { createModelCacheState, getModelLimit } from "./plugin-state";
import { createConfigHandler } from "./plugin-handlers";
const OhMyOpenCodePlugin: Plugin = async (ctx) => {
log("[OhMyOpenCodePlugin] ENTRY - plugin loading", { directory: ctx.directory })
// Start background tmux check immediately
startTmuxCheck();