fix: respect ModelScope model page limit

This commit is contained in:
CoolBoy
2026-08-02 16:03:44 +08:00
parent 0e42ef73dc
commit 80a1b8518d
4 changed files with 45 additions and 3 deletions

View File

@@ -105,7 +105,8 @@ class HuggingFaceDiscovery:
min_downloads: int,
updated_after=None,
) -> list[HFModelSummary]:
page_size = min(max(1, limit), 100)
# ModelScope OpenAPI rejects values above 50 with InputParameterError.
page_size = min(max(1, limit), 50)
max_items = min(max(1, limit), 3000)
task_tag = MODELSCOPE_TASK_TAGS.get(pipeline_tag, pipeline_tag)
models: list[HFModelSummary] = []

View File

@@ -1 +1 @@
AGENT_VERSION = "2026.08.02.1"
AGENT_VERSION = "2026.08.02.2"