Repository navigation
Support Z.ai GLM (glm-acp-agent) as a text generation provider #31715
ben-w-smith
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Problem
I use Z.ai GLM through the ACP Registry driver (
glm-acp-agent) and can't pick it as the text generation model, so thread titles, commit messages, PR text, and branch names need a second provider.Current behavior
It's blocked in the same three places described in #31680:
supportsTextGeneration: falseand its generation methods all fail (packages/provider-acp-registry/src/server/driver.ts).selectionSupportsTextGenerationinapps/server/src/serverSettings.ts), so even a saved selection never reaches GLM.Proposal
Add text generation for
glm-acp-agentonly, opt-in through the existing pickers. It follows the Antigravity precedent (AntigravityTextGeneration.ts), like #31680 does for Copilot. Other registry agents keep today's behavior, GLM is never picked as an automatic fallback, and review guides stay unsupported because they need to read the checkout.I have a working implementation in #31716. I opened it so the code is visible while you decide on direction and scope, and I'm happy to change it or wait.
How the implementation isolates GLM (glm-acp-agent 1.14.0)
defaultmode. Only the model and thinking level are applied from the saved selection, so a savedbypass_permissionsmode can't reach the helper.tool_callortool_call_updatealso fails it.ACP_GLM_SESSION_DIRpoints at a temp folder for that request. GLM supports closing a session but not deleting one, so the helper closes the session and then deletes the folder. Nothing is added to~/.local/state/glm-acp-agent/sessions.ACP_GLM_MAX_TURNS=1. Indefaultmode GLM runs reads and web lookups without asking, so the tool-call check can only stop the request after a tool has started. With one turn, a tool's output is never sent back to the model.Testing so far
glm-5.3-flashat Low thinking and generated 5 titles, about 6 seconds each. Each request's session file appeared in its temp folder and was deleted afterwards. Nothing was written to the workspace. The mode stayeddefaulteven after I picked "Bypass all permissions" in the text generation picker.Questions for maintainers
Alternatives
All reactions