Skip to content

fix(models): merge Z.AI curated models with live API results - #46623

Closed
Icather wants to merge 1 commit into
NousResearch:mainfrom
Icather:fix/zai-model-merge
Closed

fix(models): merge Z.AI curated models with live API results#46623
Icather wants to merge 1 commit into
NousResearch:mainfrom
Icather:fix/zai-model-merge

Conversation

@Icather

@Icather Icather commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Problem

Z.AI free-tier API returns only 2 models for some accounts, so the curated model list (_PROVIDER_MODELS["zai"]) was invisible in the Dashboard picker. Only the API-returned models appeared, even though the curated list contains 18 models covering text, vision, and thinking tiers.

Fix

Add "zai" to the set of providers that merge curated entries with live API results in provider_model_ids(). This matches the existing Kimi merge pattern:

if normalized in {"kimi-coding", "kimi-coding-cn", "zai"}:
    curated = list(_PROVIDER_MODELS.get(normalized, []))
    merged = list(curated)
    merged_lower = {m.lower() for m in curated}
    for m in live:
        if m.lower() not in merged_lower:
            merged.append(m)
    return merged

Curated models appear first (in priority order), then any additional models from the API.

Change

hermes_cli/models.py — 1 line, added "zai" to the merge set.

Z.AI free-tier API returns only 2 models, so the curated list
(_PROVIDER_MODELS['zai']) was invisible in the Dashboard picker.
Add 'zai' to the set of providers that merge curated entries
with live API results, matching the existing Kimi merge pattern.
Copilot AI review requested due to automatic review settings June 15, 2026 11:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates model ID merging behavior so the zai provider is treated like the existing special-cased providers when combining curated and live model lists.

Changes:

  • Adds zai to the provider set that uses curated models as a base when merging live model IDs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread hermes_cli/models.py
live = _p.fetch_models(api_key=api_key)
if live:
if normalized in {"kimi-coding", "kimi-coding-cn"}:
if normalized in {"kimi-coding", "kimi-coding-cn", "zai"}:
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/cli CLI entry point, hermes_cli/, setup wizard provider/zai ZAI provider labels Jun 15, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the PR. I’m going to close this one rather than merge it as-is.

The Z.AI surfaces are split: glm-5.2 is documented and probed as a GLM Coding Plan model (/api/coding/paas/v4), while the plain Z.AI API provider defaults to /api/paas/v4 where glm-5.1 appears to be the general API default. Adding zai to the generic curated+live merge set would make glm-5.2 show up for plain Z.AI API users even when their endpoint/account likely can’t run it.

If we fix this, it should be endpoint-aware: include glm-5.2 only when the resolved Z.AI base URL is one of the Coding Plan endpoints, and keep the general API picker on the models that are actually available there.

Appreciate the report and the small targeted patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have provider/zai ZAI provider type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants