fix(tasks): allow GLM reasoning levels - #72549
Merged
Merged
Conversation
Contributor
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
products/tasks/backend/temporal/process_task/utils.py:99-103
**GLM Inherits Anthropic Provider Routing**
Selecting this model through `runtime_adapter="claude"` derives `provider="anthropic"`, and that provider and the `@cf/zai-org/glm-5.2` model name are passed unchanged to the agent server. If provider selects the upstream API or credentials, valid `high` and `max` requests now pass validation but fail when Anthropic receives the Cloudflare-style model identifier.
Reviews (1): Last reviewed commit: "fix(tasks): allow GLM reasoning levels" | Re-trigger Greptile |
|
Note 🤖 stamphog reviewed Greptile flagged an unresolved, plausible correctness issue: selecting GLM via runtime_adapter="claude" hardcodes provider="anthropic" while the model string stays the Cloudflare-style "@cf/zai-org/glm-5.2" identifier, so newly-allowed high/max requests could pass validation here but fail downstream. It's unaddressed.
Gate mechanics and policy version
|
tatoalo
force-pushed
the
posthog-code/fix-glm-reasoning-efforts
branch
from
July 21, 2026 12:26
d228ff4 to
f0a68eb
Compare
Generated-By: PostHog Code Task-Id: 8de0334a-1bc6-40d0-85ce-1544c6105eb8
tatoalo
force-pushed
the
posthog-code/fix-glm-reasoning-efforts
branch
from
July 21, 2026 13:00
f0a68eb to
b817d02
Compare
skoob13
approved these changes
Jul 21, 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.
Problem
GLM 5.2 supports
highandmaxreasoning, but the task backend did not register the model, so valid selections were rejected before a run started. This complements PostHog/code#3615.Changes
highandmaxreasoning levels.medium.