Skip to content

Support GLM tool calling and report CLI token-limit truncation - #66

Merged
marcobambini merged 1 commit into
mainfrom
codex/glm-tools-and-token-limit
Sep 13, 2026
Merged

Support GLM tool calling and report CLI token-limit truncation#66
marcobambini merged 1 commit into
mainfrom
codex/glm-tools-and-token-limit

Conversation

@marcobambini

Copy link
Copy Markdown
Member

GLM chat containers currently reject tool definitions, and CLI replies can stop at the default 128-token limit without explaining why. This change enables GLM's native tool protocol and reports token-limit exhaustion with guidance to increase -n, while preserving natural stop behavior.

The GLM implementation incorporates #61 by @hendrikras, with additional fixes for template declaration fidelity, typed arguments, function-name whitespace, invalid tool definitions, unsupported tool history, and standalone stop-marker validation. It includes the upstream template and a strict CI oracle, HTTP/parser regression tests, and updated documentation.

Validation before rebasing onto current main: make all test; synthetic full suite (61 passed, 0 failed, 14 prerequisite skips); server suite (272 tests, 3 prerequisite skips); final focused template/parser/chat-format suite (71 passed). GitHub CI will validate the rebased branch across the configured platforms. No end-to-end inference validation with real GLM weights.

Addresses #60 and #59. Incorporates #61; issues will be closed after successful CI and merge.

Integrate GLM tool protocol work from PR #61, validate rendering against the vendored template, preserve schema argument types, and reject unsupported tool history. Report token-limit exhaustion without mislabeling natural stops.

Co-authored-by: hendrikras <3663335+hendrikras@users.noreply.github.com>
@marcobambini
marcobambini merged commit b64aacf into main Sep 13, 2026
10 checks passed
@marcobambini marcobambini mentioned this pull request Sep 13, 2026
@marcobambini
marcobambini deleted the codex/glm-tools-and-token-limit branch September 13, 2026 12:34
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