feat(model-manager): base-model multi-select filter on CivitAI browse
Add a checkbox dropdown to filter the CivitAI catalog by one or more base models (SD 1.5, SDXL, Pony, Illustrious, Flux, etc.), mapped to the API's `baseModels` array param. Backend search accepts comma-separated base_models; button shows the selected count with a Clear action. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -212,6 +212,7 @@ def _to_card(item: dict) -> dict:
|
||||
|
||||
async def civitai_search(query: Optional[str] = None,
|
||||
types: Optional[list[str]] = None,
|
||||
base_models: Optional[list[str]] = None,
|
||||
sort: Optional[str] = None,
|
||||
period: Optional[str] = None,
|
||||
nsfw: Optional[bool] = None,
|
||||
@@ -228,6 +229,8 @@ async def civitai_search(query: Optional[str] = None,
|
||||
params["query"] = query
|
||||
if types:
|
||||
params["types"] = types # httpx serializes lists as repeated params
|
||||
if base_models:
|
||||
params["baseModels"] = base_models
|
||||
if sort:
|
||||
params["sort"] = sort
|
||||
if period:
|
||||
|
||||
Reference in New Issue
Block a user