Skip to content

feat(integrations): add GLM 5.2 as an Opengateway-routed model - #1772

Merged
kevincodex1 merged 2 commits into
Twigpine:mainfrom
kevincodex1:feat/opengateway-glm-5.2
Jun 24, 2026
Merged

kevincodex1 merged 2 commits into
Twigpine:mainfrom
kevincodex1:feat/opengateway-glm-5.2

Conversation

@kevincodex1

@kevincodex1 kevincodex1 commented Jun 24, 2026 •

Copy link
Copy Markdown
Member

Summary

Add GLM 5.2 as an Opengateway-routed model — a new opengateway-glm-5.2 catalog
entry (apiName z-ai/glm-5.2) on the gitlawb-opengateway gateway, reusing the
existing glm-5.2 model descriptor. Exposes GLM 5.2 through the credit-billed
Opengateway (OpenRouter upstream) alongside the existing direct Z.AI vendor path.

Impact

  • New model selectable via the Opengateway preset: z-ai/glm-5.2.
  • No change to existing models; generated artifacts unchanged.

Testing

  • bun run integrations:check — artifacts up to date
  • tsc --noEmit — clean
  • bun test src/integrations — 207 pass / 0 fail

Summary by CodeRabbit

  • New Features
    • Added support for the new GLM 5.2 model through the Opengateway integration.
    • The GLM 5.2 option is now available in the model picker with a clearer display label for easier selection.

Add an `opengateway-glm-5.2` catalog entry (apiName `z-ai/glm-5.2`) to
the gitlawb-opengateway gateway, reusing the existing `glm-5.2` model
descriptor. Routes GLM 5.2 through the credit-billed Opengateway
(OpenRouter upstream) alongside the existing direct Z.AI vendor path.

Co-Authored-By: OpenClaude <openclaude@gitlawb.com>
@coderabbitai

coderabbitai Bot commented Jun 24, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: d6da4d18-16e0-462b-8877-dc2a32c571b5

📥 Commits

Reviewing files that changed from the base of the PR and between 68c816a and 7c42dca.

📒 Files selected for processing (1)
  • src/commands/model/model.test.tsx
📜 Recent review details
🧰 Additional context used
📓 Path-based instructions (9)
src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use TypeScript with strict mode and ESM imports

Files:

  • src/commands/model/model.test.tsx
**/*.{ts,tsx,js,jsx,py,json,md}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Follow the existing code style in the touched files

Files:

  • src/commands/model/model.test.tsx
**/*.test.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Add or update tests when the change affects behavior

Files:

  • src/commands/model/model.test.tsx
**/*.test.{ts,tsx,js}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Test the exact provider/model path you changed when possible

Files:

  • src/commands/model/model.test.tsx
**/*.{ts,tsx,js,jsx,py}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Keep comments useful and concise

Files:

  • src/commands/model/model.test.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Follow TypeScript strict mode and type safety practices by running typecheck before submitting

Files:

  • src/commands/model/model.test.tsx
**

⚙️ CodeRabbit configuration file

**: # AGENTS.md - AI Agent Coding Guide

This guide is for AI coding agents working in the OpenClaude repository. Read it before changing code, and also follow CONTRIBUTING.md for contributor policy, PR expectations, review follow-up, and project scope.

Project Snapshot

OpenClaude is a coding-agent CLI for cloud and local model providers. It supports OpenAI-compatible APIs, Anthropic, Gemini, DeepSeek, Ollama, MCP, local backends, slash commands, tools, agents, and a React/Ink terminal UI.

The installed CLI runs on Node.js >=22.0.0. Bun is used for source builds, scripts, dependency management, and tests.

Work Style

  • Keep changes focused on one problem.
  • Prefer existing patterns in the file or nearby module.
  • Avoid unrelated formatting, renames, dependency changes, or broad rewrites.
  • Add or update tests when behavior changes.
  • Update docs when setup, commands, provider behavior, or user-facing behavior changes.
  • For new features, larger refactors, dependencies, or runtime changes, follow the issue-first guidance in CONTRIBUTING.md.

Stack And Conventions

  • TypeScript with strict mode and ESM imports.
  • React + Ink for terminal UI.
  • Bun lockfile and Bun scripts for development workflows.
  • Node runtime for the built CLI.
  • Python exists for legacy/local-provider helper code. Do not add new Python code or expand Python-based features unless a maintainer explicitly approves that direction.

Common libraries and patterns:

  • chalk for terminal color.
  • commander for CLI argument parsing.
  • execa for child processes.
  • Existing service, provider, settings, permission, and UI patterns over new abstractions.

Repository Map

  • src/commands/ - slash and CLI command implementations.
  • src/components/ - React/Ink UI components.
  • src/services/ - API, MCP, OAuth, wiki, voice, and other service integrations.
  • src/tools/ - tool implementations.
  • src/utils/ - shared utilities.
  • `src/integration...

Files:

  • src/commands/model/model.test.tsx
**/*

⚙️ CodeRabbit configuration file

**/*: Apply the OpenClaude maintainer review rubric from AGENTS.md. Review the current diff, not stale discussion context. Separate real blockers from suggestions. Do not request changes for vague style churn. Treat approval as merge-ready from CodeRabbit's side, pending required human review and GitHub Checks. If checks are failing or unavailable, say so clearly instead of implying the PR is fully ready.

Files:

  • src/commands/model/model.test.tsx
{src/**/*.test.ts,src/**/*.test.tsx,tests/**,scripts/**/*.test.ts,vscode-extension/**/*.test.js}

⚙️ CodeRabbit configuration file

{src/**/*.test.ts,src/**/*.test.tsx,tests/**,scripts/**/*.test.ts,vscode-extension/**/*.test.js}: Review tests for meaningful coverage of the changed behavior, isolation of global/env/config state, async cleanup, fake timers, provider profile leaks, and Windows-compatible assumptions. Block when risky runtime changes lack focused regression coverage or tests assert implementation details while missing the user-visible behavior.

Files:

  • src/commands/model/model.test.tsx
🔇 Additional comments (1)
src/commands/model/model.test.tsx (1)

1281-1281: LGTM!


📝 Walkthrough

Walkthrough

A new static catalog entry for opengateway-glm-5.2 is added, and the model picker test expectation now includes z-ai/glm-5.2.

Changes

GLM 5.2 Opengateway Catalog Entry

Layer / File(s) Summary
GLM 5.2 catalog model registration
src/integrations/gateways/gitlawb-opengateway.ts
Appends opengateway-glm-5.2 to the gateway catalog.models array with apiName: z-ai/glm-5.2, modelDescriptorId: glm-5.2, and the user-facing label.
Model picker expectation update
src/commands/model/model.test.tsx
Adds z-ai/glm-5.2 to the expected options list for the single-model static descriptor profiles test.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

  • Gitlawb/openclaude#1515: Extends the same gitlawb-opengateway.ts catalog models list with additional Opengateway entries using the same registration pattern.
  • Gitlawb/openclaude#1539: Adds another Opengateway static catalog model entry and updates the matching model picker expectation in the same area.
  • Gitlawb/openclaude#1588: Updates the same Opengateway catalog and /model picker test flow with a new static model entry.

Suggested reviewers

  • jatmn
🚥 Pre-merge checks | ✅ 6 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Risk Surface Disclosed ⚠️ Warning The PR changes gateway routing/credential fallback for a new model, but there’s no explicit review callout of the risk surface or blocker status. Add a review note stating this is a non-blocking provider-routing/catalog expansion, or call out any blocker if the new credential fallback is unacceptable.
✅ Passed checks (6 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise, scoped, and accurately reflects the new Opengateway GLM 5.2 model entry.
Description check ✅ Passed The description covers summary, impact, and testing, with only minor template sections like Notes left incomplete.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
No Hidden Policy Change ✅ Passed The PR only adds a static catalog model entry and test expectation; defaultModel, auth, routing, telemetry, and permission metadata are unchanged.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

The model-picker option-order assertion enumerates the gitlawb-opengateway
catalog; add the new z-ai/glm-5.2 entry (after qwen/qwen3.7-max) so it
matches the catalog.

Co-Authored-By: OpenClaude <openclaude@gitlawb.com>
@kevincodex1
kevincodex1 merged commit adafde3 into Twigpine:main Jun 24, 2026
4 checks passed
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