| ZAI_API_KEY | Z.ai API key | yes | — |
| ZAI_MODEL | Z.ai model to use | no | glm-5.1 |
| ZAI_SYSTEM_PROMPT | Custom system prompt for the AI reviewer | no | "" |
| ZAI_REVIEWER_NAME | Display name for the reviewer in comments | no | Z.ai Code Review |
| GITHUB_TOKEN | GitHub token for API access | no | ${{ github.token }} |
| max_files | Maximum number of files to analyze per PR | no | 20 |
| exclude_patterns | Comma-separated file patterns to exclude from review | no | package-lock.json,yarn.lock,pnpm-lock.yaml,*.min.js,*.min.css,*.bundle.js,*.map |
| language | Language for AI review comments (e.g. en, fr, de, ja, zh, es, ar) | no | en |
| auto_approve | Automatically approve PR if no issues found | no | false |
| max_comments | Maximum number of inline comments to post per review | no | 50 |
| ai_base_url | Base URL for the Z.ai API | no | https://api.z.ai |
| use_coding_plan | Use the GLM Coding Plan endpoint instead of the standard API | no | true |
| enable_thinking | Enable chain-of-thought reasoning for deeper analysis (increases token usage) | no | false |
| autofix_mode | Autofix mode: disabled (default), suggest (render suggestions), or commit (apply fixes directly to branch) | no | disabled |
| incremental | Only review files changed since the last review (true/false) | no | true |
| chat_enabled | Enable /zai-review chat commands in PR comments (true/false) | no | true |
| chat_allowed_roles | Comma-separated GitHub roles allowed to use chat commands (OWNER, MEMBER, COLLABORATOR, etc.) | no | OWNER,MEMBER,COLLABORATOR |