fix: address Cubic P2 issues in doctor checks and agent overrides

This commit is contained in:
YeonGyu-Kim
2026-02-08 22:03:58 +09:00
parent babcb0050a
commit 7331cbdea2
3 changed files with 11 additions and 5 deletions
@@ -1,6 +1,7 @@
import { existsSync, readFileSync } from "node:fs"
import { homedir } from "node:os"
import { join } from "node:path"
import { parseJsonc } from "../../../shared"
import type { AvailableModelsInfo } from "./model-resolution-types"
function getOpenCodeCacheDir(): string {
@@ -18,7 +19,7 @@ export function loadAvailableModelsFromCache(): AvailableModelsInfo {
try {
const content = readFileSync(cacheFile, "utf-8")
const data = JSON.parse(content) as Record<string, { models?: Record<string, unknown> }>
const data = parseJsonc<Record<string, { models?: Record<string, unknown> }>>(content)
const providers = Object.keys(data)
let modelCount = 0