Skip to content

Respect configured ZAI base URL#37816

Open
zhangr011 wants to merge 1 commit into
NousResearch:mainfrom
zhangr011:codex/fix-zai-config-base-url
Open

Respect configured ZAI base URL#37816
zhangr011 wants to merge 1 commit into
NousResearch:mainfrom
zhangr011:codex/fix-zai-config-base-url

Conversation

@zhangr011

@zhangr011 zhangr011 commented Jun 3, 2026

Copy link
Copy Markdown

Fixes #18302.

Summary

  • prefer explicit model.base_url for ZAI after GLM_BASE_URL and before endpoint probing/defaults
  • make ZAI provider status report the configured base URL
  • make auxiliary credential-pool resolution honor the configured ZAI base URL so stale pool entries do not send side tasks back to /api/paas/v4
  • add regression coverage for resolver precedence and auxiliary stale-pool override

Verification

  • python -m py_compile hermes_cli/auth.py agent/auxiliary_client.py tests/hermes_cli/test_api_key_providers.py tests/agent/test_auxiliary_client.py
  • PYTHONPATH=/Users/zhangrong/Documents/home/.pytest-shim:/Users/zhangrong/Documents/home/hermes-agent python -m pytest -q tests/hermes_cli/test_api_key_providers.py::TestZaiEndpointAutoDetect::test_config_base_url_skips_probe tests/agent/test_auxiliary_client.py::test_zai_pool_base_url_honors_config_override
    • Result: 2 passed, 8 warnings

Note: local Conda Python segfaults when importing native readline, so the targeted pytest run used a temporary sitecustomize.py shim that preloads a no-op readline module.

@alt-glitch alt-glitch added type/bug Something isn't working provider/zai ZAI provider P3 Low — cosmetic, nice to have P2 Medium — degraded but workaround exists labels Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Medium — degraded but workaround exists P3 Low — cosmetic, nice to have provider/zai ZAI provider type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: ZAI/GLM provider base_url causes 429/404 errors — config ignored by 5 code paths

2 participants