mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-06-16 13:34:04 +08:00
5ef72a2030
* fix(codex): add multi-platform CLI discovery and static gpt-5.5 template fallback for model catalog generation When cc-switch generates a Codex model catalog for third-party providers, it needs the gpt-5.5 model definition as a template. Previously it relied on either ~/.codex/models_cache.json (only exists when Codex has connected to OpenAI) or running 'codex debug models --bundled' (fails when codex is not on the Tauri app's PATH, common in macOS GUI environments). This commit adds a three-tier fallback: 1. Try 'codex' from PATH, then platform-specific common paths (/opt/homebrew/bin/codex, /usr/local/bin/codex, etc.) 2. If all CLI attempts fail, use a compile-time embedded gpt-5.5 template (extracted from codex 0.135.0 bundled models) Also adds tests for the static template validity and CLI candidates. * fix(codex): discover user node codex installs --------- Co-authored-by: Jason <farion1231@gmail.com>
5ef72a2030
ยท
2026-05-31 22:48:27 +08:00
History