Add Z.AI (GLM) provider; restore workspace build#72
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)
glm-5.1completion flowed end-to-end throughOpenAiCompatibleProvideragainsthttps://api.z.ai/api/coding/paas/v4, on both the direct path and theProviderRegistry::get_providers->completepath the planner uses. Response content, token usage, and latency parsed correctly.choices[].message.content,usage.total_tokens) matches the client.Changes
zaiprovider added to the catalog (Z.AI / Zhipu international GLM, OpenAI-compatible,ZAI_API_KEY, basehttps://api.z.ai/api/paas/v4; coding-plan keys use/api/coding/paas/v4). Documented indocs/model-providers.mdand.env.example, with a unit test.gatewaybuild fix: declare thetower-httpdependency it already imports (CorsLayer). This was a pre-existing break that stoppedcargo build --workspace.Verification
cargo test -p clawforge-plannerand-p clawforge-controlplanepass (90 tests total).cargo build --workspacenow succeeds.Note on
cargo test --workspaceThree unrelated crates (
clawforge-cli,clawforge-memory,clawforge-scheduler) have pre-existing stale test fixtures (newCapabilities/AgentSpecfields and renamedclawforge_memoryexports) that fail to compile undercargo test. Their libraries build fine. Repairing those fixtures is a separate, focused cleanup and is intentionally not bundled here.