oh-my-coding-maas-gateway
Health Warn
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 5 GitHub stars
Code Pass
- Code scan — Scanned 12 files during light audit, no dangerous patterns found
Permissions Pass
- Permissions — No dangerous permissions requested
No AI report is available for this listing yet.
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.
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)
4 models: glm-5.3, glm-5.2, glm-5.1, deepseek-v4.1-flash-1017 (accepts image
input — first multimodal model)
Install
The bootstrap script is the only installation method. It handles
everything — prerequisites, Docker stack, coding tools, virtual keys,
validation, and optional companion skill.
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.
Non-interactive
# Fresh install with API key (no prompts)
curl -fsSL https://raw.githubusercontent.com/wallacelw/oh-my-coding-maas-gateway/main/scripts/bootstrap.sh | bash -s -- -y --api-key=sk-xxxx
# Upgrade existing install (pull updates, regenerate configs)
curl -fsSL https://raw.githubusercontent.com/wallacelw/oh-my-coding-maas-gateway/main/scripts/bootstrap.sh | bash -s -- -y
# Non-interactive with specific tools only
curl -fsSL https://raw.githubusercontent.com/wallacelw/oh-my-coding-maas-gateway/main/scripts/bootstrap.sh | bash -s -- -y --api-key=sk-xxxx --tool=litellm,opencode
Non-interactive upgrades discard local repo changes if git pull fails —
bootstrap prints a warning counting what is being discarded before
resetting to origin/main. .env, the generated LiteLLM config, and
Docker volumes are preserved; tracked repo files, including config
templates, are reset.
Estimated time: ~5 min fresh, ~2 min upgrade. For flags and non-interactive
usage, see INSTALLATION.md.
After install
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.
curl -fsSL https://raw.githubusercontent.com/wallacelw/oh-my-coding-maas-gateway/main/scripts/bootstrap.sh | bash
Or non-interactive:
curl -fsSL https://raw.githubusercontent.com/wallacelw/oh-my-coding-maas-gateway/main/scripts/bootstrap.sh | bash -s -- -y
In non-interactive mode, if git pull fails, bootstrap warns about the
local commits and uncommitted changes it is discarding, then resets toorigin/main — .env, the generated LiteLLM config, and Docker volumes
are preserved; tracked repo files, including config templates, are reset.
After upgrade, restart any running coding tools — plugin/preset changes
are not hot-reloaded.
Update coding tools only
To check and update individual components (opencode, Codex, Claude Code,
Pi, LiteLLM, Grafana, Prometheus; PostgreSQL is listed as pinned and
display-only, never auto-updated) without re-running the full pipeline:
./scripts/update.sh # interactive: show versions, select which to update
./scripts/update.sh --check # show version table only
./scripts/update.sh --all # update all with updates available
./scripts/update.sh --dry-run # show what would be updated, no changes
Does not touch passwords, API keys, or virtual keys. Note: updating
Docker images or slim plugin modifies docker-compose.yml andscripts/03a_opencode.sh in-place — changes are auto-committed.
Companion Skill
After installation, bootstrap offers to install
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.
./scripts/05_skill.sh --yes # install manually anytime
Uninstall
./scripts/uninstall.sh --all --dry-run # preview
./scripts/uninstall.sh --tool=opencode # remove one agent
./scripts/uninstall.sh --all # remove everything
Backup
./scripts/06_backup.sh # dump LiteLLM DB (spend history, keys, budgets)
./scripts/06_backup.sh --restore FILE # restore from a dump
./scripts/07_dashboard_shots.sh # capture Grafana dashboard screenshots (visual verification)
Run before docker compose down -v — the DB volume is destroyed otherwise.
Documentation
| File | For | Description |
|---|---|---|
| INSTALLATION.md | Everyone | Install process, pipeline, flags, env vars, prerequisites, per-tool usage, monitoring, remote access, recovery, upgrade |
| SKILL.md | Agents | Operational companion: install, upgrade, diagnose, key/model management, recovery |
| REFERENCE.md | Everyone | Architecture, config, env vars, tool integration, repair guide, lifecycle |
| CHANGELOG.md | Everyone | Version history |
| AGENTS.md | Contributors | Development rules, validation, commit conventions |
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found