fix(download): accept mirror/www Civitai hosts and clarify linked-file errors

Follow-up to #1152:
- Accept civitai.green and www-prefixed hosts in isSupportedCivitaiPageHost,
  aligning with py/utils/civitai_utils.py and extensionReimportBridge.js, so
  download URLs on those hosts resolve too
- Drop the duplicate civitaiModelByVersion entry from the LoRA-specific
  endpoint map; the shared getApiEndpoints map now provides it for all types
- Report a distinct error when a linked fileId exists in the version but is
  not a downloadable model weight file (new linkedFileNotWeightFile locale key)
This commit is contained in:
Will Miao
2026-10-21 21:53:59 +08:00
parent 8033292ad8
commit 0be3ea7d98
15 changed files with 50 additions and 9 deletions
-1
View File
@@ -154,7 +154,6 @@ export const MODEL_SPECIFIC_ENDPOINTS = {
civitaiUrl: `/api/lm/${MODEL_TYPES.LORA}/civitai-url`,
metadata: `/api/lm/${MODEL_TYPES.LORA}/metadata`,
getTriggerWordsPost: `/api/lm/${MODEL_TYPES.LORA}/get_trigger_words`,
civitaiModelByVersion: `/api/lm/${MODEL_TYPES.LORA}/civitai/model/version`,
civitaiModelByHash: `/api/lm/${MODEL_TYPES.LORA}/civitai/model/hash`,
},
[MODEL_TYPES.CHECKPOINT]: {