Fix GLM-5.2 requests failing with 400 on the developer role - #2
Open
estridell wants to merge 1 commit into
Open
Conversation
The GLM upstream behind ClinePass rejects the `developer` role with 400 "developer is not one of ['system', 'assistant', 'user', 'tool', 'function']", so every glm-5.2 request failed before generation. - Set compat.supportsDeveloperRole: false on the glm-5.2 catalog entry (carries through the live recommended-models merge via the static entry spread) - Type PiModel.compat as pi-ai's OpenAICompletionsCompat so model entries can carry the full compat surface - Merge prompt-cache compat into any existing entry compat instead of replacing it
estridell
marked this pull request as ready for review
July 22, 2026 10:46
maybeenang
added a commit
to maybeenang/pi-cline
that referenced
this pull request
Jul 27, 2026
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.
Every
cline-pass/glm-5.2request failed before generation:pi sends the system prompt with the
developerrole for reasoning models, and the GLM upstream behind ClinePass only acceptssystem/assistant/user/tool/function.Fix: set
compat.supportsDeveloperRole: falseon the glm-5.2 catalog entry so pi sends the system prompt as a plainsystemmessage. The flag survives the live recommended-models merge because that path spreads the static entry.Also widened
PiModel.compatfrom the prompt-cache-onlyClinePromptCacheCompatto pi-ai'sOpenAICompletionsCompatso catalog entries can carry the full compat surface, and madewithClinePromptCacheCompatmerge into existing entry compat instead of replacing it (no behavioral change today since glm-5.2 isn't cache-flagged, but the next entry that needs both would have silently lost one).Verified
fetchClinePassModels()returns glm-5.2 withcompat.supportsDeveloperRole: falseon both the static fallback and the live fetch path, and a real glm-5.2 request through pi succeeds with the flag set.npm testpasses.Other ClinePass models may need the same flag if their upstreams reject
developer, but I only had a failing report for glm-5.2, so I kept this scoped.