#22941: feat: add ZHIPU provider + doctor chat check (Phase 1A)
channel: msteams
commands
agents
size: M
Cluster:
Model Provider Integrations
Phase 1A: ZHIPU provider enablement + doctor connectivity
- Add ZHIPU provider registration (chat + vision models) using OpenAI-compatible base.
- Add env mapping: ZHIPU_API_KEY.
- Add ZHIPU REST client scaffold (chat/OCR/images/videos/TTS endpoints).
- Add `openclaw doctor` ZHIPU section with a single chat connectivity probe and robust output extraction (content or reasoning_content).
## Summary
Describe the problem and fix in 2–5 bullets:
- Problem: OpenClaw lacked a ZHIPU provider integration and a reliable way to verify ZHIPU connectivity.
- Why it matters: Enables routing to ZHIPU models and provides a quick health check for credentials/connectivity.
- What changed: Added zhipu provider registration (chat+vision), env mapping ZHIPU_API_KEY, ZHIPU REST client scaffold, and openclaw doctor ZHIPU connectivity check (content/reasoning_content extraction).
- What did NOT change (scope boundary): No default provider/model changes; no orchestration/team routing; no OCR/image/video/TTS wiring beyond client scaffolding
## Change Type (select all)
- [ ] Bug fix
- [x] Feature
- [ ] Refactor
- [ ] Docs
- [ ] Security hardening
- [ ] Chore/infra
## Scope (select all touched areas)
- [ ] Gateway / orchestration
- [ ] Skills / tool execution
- [ ] Auth / tokens
- [ ] Memory / storage
- [ ] Integrations
- [ ] API / contracts
- [ ] UI / DX
- [ ] CI/CD / infra
## Linked Issue/PR
- Closes #
- Related #
## User-visible / Behavior Changes
List user-visible changes (including defaults/config).
If none, write `None`.
## Security Impact (required)
- New permissions/capabilities? (`Yes/No`)
- Secrets/tokens handling changed? (`Yes/No`)
- New/changed network calls? (`Yes/No`)
- Command/tool execution surface changed? (`Yes/No`)
- Data access scope changed? (`Yes/No`)
- If any `Yes`, explain risk + mitigation:
## Repro + Verification
### Environment
- OS:
- Runtime/container:
- Model/provider:
- Integration/channel (if any):
- Relevant config (redacted):
### Steps
1.
2.
3.
### Expected
-
### Actual
-
## Evidence
Attach at least one:
- [ ] Failing test/log before + passing after
- [ ] Trace/log snippets
- [ ] Screenshot/recording
- [ ] Perf numbers (if relevant)
## Human Verification (required)
What you personally verified (not just CI), and how:
- Verified scenarios:
- Edge cases checked:
- What you did **not** verify:
## Compatibility / Migration
- Backward compatible? (`Yes/No`)
- Config/env changes? (`Yes/No`)
- Migration needed? (`Yes/No`)
- If yes, exact upgrade steps:
## Failure Recovery (if this breaks)
- How to disable/revert this change quickly:
- Files/config to restore:
- Known bad symptoms reviewers should watch for:
## Risks and Mitigations
List only real risks for this PR. Add/remove entries as needed. If none, write `None`.
- Risk:
- Mitigation:
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
Added ZHIPU provider integration with OpenAI-compatible API support and connectivity health check. Registers 8 GLM models (chat + vision) using `ZHIPU_API_KEY`, adds REST client scaffold for chat/OCR/images/videos/TTS endpoints, and integrates a `openclaw doctor` probe that tests chat connectivity with robust content extraction.
- Follows existing provider patterns (compare with NVIDIA/Qianfan providers)
- Doctor health check added alongside memory search health check
- Client uses proper error handling with custom `ZhipuProviderError` class
- Two minor style issues: duplicated base URL constant and unused helper function
<h3>Confidence Score: 4/5</h3>
- Safe to merge with minor style improvements recommended
- The implementation follows established patterns for other providers (NVIDIA, Qianfan) and includes proper error handling. The two style issues (duplicated constant and unused function) don't affect functionality but should be cleaned up to maintain code quality.
- No files require special attention - the style issues are minor and non-blocking
<sub>Last reviewed commit: aa147da</sub>
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#19326: Agents: improve z.ai GLM-5 integration and failover
by gabrielespinheira · 2026-02-17
77.0%
#20965: feat: Add comprehensive model configuration and discovery for various…
by rodeok · 2026-02-19
77.0%
#7113: feat(providers): add CommonStack provider support
by flhoildy · 2026-02-02
75.9%
#22569: [Feature] add provider wizard
by antonidasyang · 2026-02-21
75.5%
#15327: feat:(models): discover ZAI models dynamically for GLM-5 support [A...
by vincentkoc · 2026-02-13
74.0%
#14187: fix: add Moonshot AI to non-standard provider detection
by shad0wca7 · 2026-02-11
73.7%
#21076: feat(quota): unify provider quota tracking and usage UI across prov...
by romeroej2 · 2026-02-19
73.1%
#13814: feat(web-search): add ZAI Search (zsearch) provider
by strelov1 · 2026-02-11
72.6%
#19020: bugfix(gateway): Handle invalid model provider API config gracefully\…
by funkyjonx · 2026-02-17
72.5%
#16766: fix(model): apply provider baseUrl/headers override to registry-fou...
by dzianisv · 2026-02-15
72.2%