Skip to content

feat: DeepSeek V4 models, Z.AI/GLM provider, model tags in provider cards#1213

Closed
jasonjcwu wants to merge 6 commits intonesquena:masterfrom
jasonjcwu:feat/deepseek-v4-models
Closed

feat: DeepSeek V4 models, Z.AI/GLM provider, model tags in provider cards#1213
jasonjcwu wants to merge 6 commits intonesquena:masterfrom
jasonjcwu:feat/deepseek-v4-models

Conversation

@jasonjcwu
Copy link
Copy Markdown
Contributor

4 commits:

  1. Add DeepSeek V4 Flash & V4 Pro models
    Add deepseek-v4-flash and deepseek-v4-pro model entries to _MODEL_LIST, _PROVIDER_MODELS, static dropdown, and label map.
  2. Add Z.AI / GLM (智谱) provider setup UI
    Add zai provider to onboarding _SUPPORTED_PROVIDER_SETUPS with default model glm-5.1 and base URL https://open.bigmodel.cn/api/coding/paas/v4. Add GLM model series (glm-5.1, glm-5, glm-5-turbo, glm-4.7, glm-4.5, glm-4.5-flash) to _MODEL_LIST. Update DeepSeek default model to v4-flash and base_url to bare domain (no /v1).
  3. Remove deprecated DeepSeek V3 / Reasoner models
    Clean up deepseek-chat-v3-0324 and deepseek-reasoner from all model lists — these are deprecated since 2026-07-24. Keep only v4-flash and v4-pro.
  4. Show model name tags in provider cards + scan custom_providers

Add deepseek-v4-flash and deepseek-v4-pro model entries to:
- api/config.py (_MODEL_LIST and _PROVIDER_MODELS)
- static/index.html (model dropdown)
- static/ui.js (static label map)

These are the latest DeepSeek models with 1M context window,
replacing the legacy deepseek-chat/deepseek-reasoner (deprecated 2026-07-24).
- Add zai (Z.AI / GLM / 智谱) to onboarding _SUPPORTED_PROVIDER_SETUPS
  with default model glm-5.1
- Add GLM models (glm-5.1, glm-5, glm-5-turbo, glm-4.x) to _MODEL_LIST
  for display in model dropdowns
- Update DeepSeek default_model from deepseek-chat-v3-0324 to deepseek-v4-flash
- Update DeepSeek default_base_url from /v1 to bare domain (API docs change)
- Remove deepseek-chat-v3-0324 (DeepSeek V3) and deepseek-reasoner (R1)
  from _MODEL_LIST, _PROVIDER_MODELS, static/index.html, and static/ui.js
- Keep only deepseek-v4-flash and deepseek-v4-pro
- These old model IDs are deprecated since 2026-07-24
Provider card improvements:
- Show model name tags when a provider card is expanded (panels.js)
- Add .provider-card-model-tag styling (style.css)

Custom providers in providers panel:
- Scan config.yaml custom_providers (e.g. glmcode, timicc) and list
  them as providers with their configured models (api/providers.py)
- Detect API key status from env var references (${ENV_VAR})
…dels

- Test custom_providers entries (glmcode, deepseek) appear in get_providers()
- Test env var reference detection (${VAR_NAME} pattern)
- Test bare API key, missing key, empty/malformed entries
- Assert DeepSeek V4 models present, V3 deprecated models removed
- Assert GLM model series in _PROVIDER_MODELS and onboarding setup
@nesquena-hermes
Copy link
Copy Markdown
Collaborator

Thanks for the PR, @jasonjcwu! This covers a good chunk of model list maintenance. A few notes before merge:

Deprecation date concern — V3 model removal may be premature

The commit message states the V3/R1 models are "deprecated since 2026-07-24." Today is 2026-04-28, so that date is still ~3 months away. If the models remain usable until July, removing them now would break any user who has configured deepseek-chat-v3-0324 or deepseek-reasoner in their setup. Could you clarify the timeline? If V4 is the current preferred path but V3 is still live, the safer approach is to keep V3 in the list (maybe mark as "legacy" in the label) rather than removing it outright.

Bundled scope — consider splitting

This PR touches four independent concerns:

  1. DeepSeek V4 model additions
  2. Z.AI / GLM provider onboarding + model entries
  3. DeepSeek V3 model removals
  4. Provider card UI improvements (model tags + custom_providers scanning)

Items 1 and 2 are additive and low-risk. Items 3 and 4 are larger in blast radius. If you'd like faster review, splitting into a "model additions only" PR and a separate "V3 cleanup + card UI" PR would help.

Z.AI / GLM details to verify

  • Is glm-5.1 the correct current default model ID for Z.AI? Please confirm against the official API docs.
  • The base URL https://open.bigmodel.cn/api/coding/paas/v4 — is /coding/ the right path for the general-purpose API, or is that a specific endpoint variant?

Unit tests

The new test coverage for custom_providers scanning and model presence is appreciated — that's the right instinct. Please make sure CI passes cleanly before re-requesting review.

Happy to help iterate if you want to split this into smaller pieces!

- Restore deepseek-chat-v3-0324 and deepseek-reasoner with '(legacy)' labels;
  these are deprecated 2026-07-24 but still live until then
- Fix zai (Z.AI/GLM) default_base_url: use /api/paas/v4 instead of /api/coding/paas/v4;
  the coding plan path is for the glmcode custom provider, not the general API
- Update test assertions to match
@jasonjcwu
Copy link
Copy Markdown
Contributor Author

Good catches — fixed:

V3 removal: Restored with (legacy) labels. They stay until 2026-07-24.

Z.AI base_url: Good catch. The /coding/ path was wrong — that's for the coding-plan endpoint (glmcode custom provider), not the general API. Fixed to https://open.bigmodel.cn/api/paas/v4.

glm-5.1: Yes, confirmed — it's the current flagship model ID in upstream hermes-agent's model_metadata.py and _PROVIDER_MODELS['zai'].

Tests: Updated assertions + 10 tests all passing.

@nesquena-hermes
Copy link
Copy Markdown
Collaborator

Thanks for the quick fixes, @jasonjcwu! The review feedback has been addressed cleanly:

  • ✅ V3/R1 models restored with (legacy) labels — correct approach while they remain live until 2026-07-24
  • ✅ Z.AI base URL fixed to https://open.bigmodel.cn/api/paas/v4 — the /coding/ path would have been wrong for general API calls
  • glm-5.1 confirmed as the current flagship model ID

Remaining items before merge:

  1. Full test suite — the updated assertions look right, but please confirm all 10 tests pass with uv run --with pytest pytest tests/ -q (not just the targeted subset). Given the V3 restore + base URL change, a broader run is worth it.

  2. DeepSeek default base URL — commit 2 updates DeepSeek's default_base_url to the bare domain. Can you confirm the bare domain (without /v1) is what the current DeepSeek V4 API docs specify? Some providers changed their base URL format with new model generations.

  3. PR titleFeat/deepseek v4 models doesn't fully reflect the scope anymore (GLM/Z.AI additions, provider card UI improvements). A title like feat: add DeepSeek V4 + Z.AI/GLM models, show model tags in provider cards would make the merge commit more descriptive. Up to you and the maintainer.

This is shaping up well — appreciate the responsiveness on the review feedback!

@jasonjcwu jasonjcwu changed the title Feat/deepseek v4 models feat: DeepSeek V4 models, Z.AI/GLM provider, model tags in provider cards Apr 28, 2026
@jasonjcwu
Copy link
Copy Markdown
Contributor Author

Full test suite — 68 passed, 0 failed
tests/test_provider_management.py ......... 16 passed
tests/test_model_resolver.py ............... 20 passed
tests/test_custom_providers_in_panel.py .... 10 passed
tests/test_issue572.py .................... 11 passed
tests/test_issue1094_provider_bugs.py ..... 11 passed
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Total: 68 passed, 0 failed

@nesquena-hermes
Copy link
Copy Markdown
Collaborator

Thanks for sharing the full test run, @jasonjcwu! 68 passed, 0 failed across all five test modules is a clean result. The coverage across test_provider_management, test_model_resolver, test_custom_providers_in_panel, test_issue572, and test_issue1094_provider_bugs confirms the changes are solid. This PR looks ready for maintainer review and merge. 🎉

@nesquena-hermes
Copy link
Copy Markdown
Collaborator

Merged in v0.50.237 via #1243. Thank you @jasonjcwu! 🎉

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants