Failed to fetch models - cc-switch
Quick fix
Upgrade cc-switch to v3.16.4+ for the 404 probe fix. On a Coding Plan, change the API address by hand and enter the model names yourself.
Symptom
Section titled “Symptom”添加新的供应商,或者在老供应商里,无法获取模型Cannot fetch models, either when adding a new provider or on an existing one
This cluster holds several different GLM model list problems. The core symptom, "cannot fetch models", has two main causes: a 404 on the GLM model list probe endpoint in older versions (v3.16.3 and earlier); and using the Zhipu Coding Plan, whose dedicated API does not support a model list endpoint, so forcing the request returns 429. The cluster also holds two derived display problems: duplicate entries in the dropdown because old config was not cleaned up after renaming a model; and the 5-hour and 7-day remaining quotas shown the wrong way round on the model list page, because the old logic sorted by nextResetTime and mislabels them at the end of a cycle.
Upgrade cc-switch to v3.16.4 or newer for the GLM model list probe 404 fix and the corrected remaining-quota display logic.
On the Zhipu Coding Plan, change the API address in the config by hand to https://open.bigmodel.cn/api/coding/paas/v4 and enter the model names yourself, since that API cannot fetch a model list automatically.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 4 real issues
- Why are the 5-hour and 7-day remaining quotas swapped in my GLM model list?
- A bug from the old version sorting by nextResetTime, which mislabels the two buckets in the final hours of a weekly cycle. Maintainers changed it to classify by the unit field in the response — upgrade to the latest version.
- After changing the model name parameter, both the old and new models appear in the dropdown. What now?
- Config updates appended without overwriting and cleaning up. That issue is currently marked stale — clean the old config by hand, or wait for a front-end fix.
- Why does the Zhipu Coding Plan report 429 and fail to fetch models?
- Coding Plan needs its dedicated API address https://open.bigmodel.cn/api/coding/paas/v4, and that endpoint does not support fetching a model list automatically — enter the model names by hand in cc-switch.
Related problems
Section titled “Related problems”This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.