tui: allow specifying custom models file path via OPENCODE_MODELS_PATH

Users can now configure their own models configuration file by setting the OPENCODE_MODELS_PATH environment variable, providing more flexibility for testing and configuration.
This commit is contained in:
Dax Raad
2026-01-31 01:53:23 -05:00
parent 8e5db3083c
commit 6ecd011e51
4 changed files with 4 additions and 6 deletions

View File

@@ -25,6 +25,7 @@ process.env["XDG_DATA_HOME"] = path.join(dir, "share")
process.env["XDG_CACHE_HOME"] = path.join(dir, "cache")
process.env["XDG_CONFIG_HOME"] = path.join(dir, "config")
process.env["XDG_STATE_HOME"] = path.join(dir, "state")
process.env["OPENCODE_MODELS_PATH"] = path.join(import.meta.dir, "tool", "fixtures", "models-api.json")
// Write the cache version file to prevent global/index.ts from clearing the cache
const cacheDir = path.join(dir, "cache", "opencode")