https://github.com/wallacelw/oh-my-coding-maas-gateway
LiteLLM proxy gateway to Huawei ModelArts MaaS for coding agents. Supports opencode, Codex CLI, and Claude Code CLI with dual-format API deployments (OpenAI Chat Completions + Anthropic Messages), load balancing, virtual key management, and Prometheus + Grafana observability.
https://github.com/wallacelw/oh-my-coding-maas-gateway
claude-code codex gateway huawei-maas litellm observability opencode proxy
Last synced: 3 days ago
JSON representation
LiteLLM proxy gateway to Huawei ModelArts MaaS for coding agents. Supports opencode, Codex CLI, and Claude Code CLI with dual-format API deployments (OpenAI Chat Completions + Anthropic Messages), load balancing, virtual key management, and Prometheus + Grafana observability.
- Host: GitHub
- URL: https://github.com/wallacelw/oh-my-coding-maas-gateway
- Owner: wallacelw
- License: mit
- Created: 2026-06-21T02:08:53.000Z (18 days ago)
- Default Branch: main
- Last Pushed: 2026-06-29T03:25:14.000Z (10 days ago)
- Last Synced: 2026-06-29T04:22:46.866Z (10 days ago)
- Topics: claude-code, codex, gateway, huawei-maas, litellm, observability, opencode, proxy
- Language: Shell
- Homepage:
- Size: 571 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Agents: AGENTS.md
Awesome Lists containing this project
README
# oh-my-coding-maas-gateway
LiteLLM proxy routing Huawei MaaS models to opencode, Codex CLI, Claude
Code CLI, and Pi agent — with virtual keys, multi-key load balancing,
dual-format endpoints, and Prometheus + Grafana observability.
---
## What Is This?
A self-hosted gateway that sits between your coding tools and Huawei ModelArts
MaaS, giving you load balancing, virtual keys, budget tracking, and
observability — all through a single local proxy.
```
Tools LiteLLM (:4000) Huawei MaaS
───── ─────────────── ────────────
opencode ──→ /v1/chat/completions ──→ openai/ provider ──→ MaaS OpenAI endpoint
Codex CLI ──→ /v1/responses ──→ openai/ provider ──→ MaaS OpenAI endpoint
Claude Code ──→ /v1/messages ──→ anthropic/ provider ──→ MaaS Anthropic endpoint
Pi agent ──→ /v1/chat/completions ──→ openai/ provider ──→ MaaS OpenAI endpoint
LiteLLM: load-balances across N MaaS keys · PostgreSQL (:5432)
Observability: LiteLLM ──/metrics──→ Prometheus (:9090) ──→ Grafana (:3000)
```
**6 models:** glm-5.2, glm-5.1, glm-5, deepseek-v4-pro, deepseek-v4-flash,
deepseek-v3.2
---
## Install
The bootstrap script is the only installation method. It handles
everything — prerequisites, Docker stack, coding tools, virtual keys,
validation, and optional companion skill.
```bash
curl -fsSL https://raw.githubusercontent.com/wallacelw/oh-my-coding-maas-gateway/main/scripts/bootstrap.sh | bash
```
Bootstrap will prompt for your Huawei MaaS API key, show an interactive
menu to select which coding tools to install, auto-install prerequisites,
deploy the proxy + observability stack, configure each tool with its own
virtual key, run validation, and offer to install the companion skill.
Estimated time: ~5 min fresh, ~2 min upgrade. For flags and non-interactive
usage, see [INSTALLATION.md](./INSTALLATION.md).
### After install
```bash
opencode # or: codex or: claude --bare or: pi
```
Monitor at `http://localhost:3000` (Grafana) or `http://localhost:4000/ui`
(LiteLLM Admin).
---
## Upgrade
Same command — bootstrap detects existing install, compares versions, and
pulls updates. All secrets and data preserved.
```bash
curl -fsSL https://raw.githubusercontent.com/wallacelw/oh-my-coding-maas-gateway/main/scripts/bootstrap.sh | bash
```
After upgrade, restart any running coding tools — plugin/preset changes
are not hot-reloaded.
---
## Companion Skill
After installation, bootstrap offers to install
[SKILL.md](./SKILL.md) as a skill into each detected coding agent. This
gives your agents operational guidance — health diagnosis, key/model
management, debug routing, observability, and recovery.
```bash
./scripts/05_skill.sh --yes # install manually anytime
```
---
## Uninstall
```bash
./scripts/uninstall.sh --all --dry-run # preview
./scripts/uninstall.sh --tool=opencode # remove one agent
./scripts/uninstall.sh --all # remove everything
```
---
## Documentation
| File | For | Description |
|------|-----|-------------|
| **[INSTALLATION.md](./INSTALLATION.md)** | Everyone | Install process, pipeline, flags, env vars, prerequisites, per-tool usage, monitoring, remote access, recovery, upgrade |
| **[SKILL.md](./SKILL.md)** | Agents | Operational companion: install, upgrade, diagnose, key/model management, recovery |
| **[REFERENCE.md](./REFERENCE.md)** | Everyone | Architecture, config, env vars, tool integration, repair guide, lifecycle |
| **[CHANGELOG.md](./CHANGELOG.md)** | Everyone | Version history |
| **[AGENTS.md](./AGENTS.md)** | Contributors | Development rules, validation, commit conventions |