Skip to content

Add Z.AI (GLM) provider; restore workspace build#72

Merged
YASSERRMD merged 2 commits into
mainfrom
fix_workspace_build_zai
Jun 9, 2026
Merged

Add Z.AI (GLM) provider; restore workspace build#72
YASSERRMD merged 2 commits into
mainfrom
fix_workspace_build_zai

Conversation

@YASSERRMD

Copy link
Copy Markdown
Owner

Summary

Validated the multi-provider path against a live GLM (Z.AI) endpoint, and folds in the fixes that work surfaced.

Live validation (not committed; key supplied for testing only)

  • A real glm-5.1 completion flowed end-to-end through OpenAiCompatibleProvider against https://api.z.ai/api/coding/paas/v4, on both the direct path and the ProviderRegistry::get_providers -> complete path the planner uses. Response content, token usage, and latency parsed correctly.
  • Confirmed Z.AI's response shape (choices[].message.content, usage.total_tokens) matches the client.

Changes

  • zai provider added to the catalog (Z.AI / Zhipu international GLM, OpenAI-compatible, ZAI_API_KEY, base https://api.z.ai/api/paas/v4; coding-plan keys use /api/coding/paas/v4). Documented in docs/model-providers.md and .env.example, with a unit test.
  • gateway build fix: declare the tower-http dependency it already imports (CorsLayer). This was a pre-existing break that stopped cargo build --workspace.

Verification

  • cargo test -p clawforge-planner and -p clawforge-controlplane pass (90 tests total).
  • cargo build --workspace now succeeds.

Note on cargo test --workspace

Three unrelated crates (clawforge-cli, clawforge-memory, clawforge-scheduler) have pre-existing stale test fixtures (new Capabilities/AgentSpec fields and renamed clawforge_memory exports) that fail to compile under cargo test. Their libraries build fine. Repairing those fixtures is a separate, focused cleanup and is intentionally not bundled here.

@YASSERRMD YASSERRMD merged commit 84407c7 into main Jun 9, 2026
0 of 4 checks passed
@YASSERRMD YASSERRMD deleted the fix_workspace_build_zai branch June 9, 2026 16:57
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.

1 participant