higress-auto-router

1
0
Source

Configure automatic model routing using the get-ai-gateway.sh CLI tool for Higress AI Gateway. Use when: (1) User wants to configure automatic model routing, (2) User mentions 'route to', 'switch model', 'use model when', 'auto routing', (3) User describes scenarios that should trigger specific models, (4) User wants to add, list, or remove routing rules.

Install

mkdir -p .claude/skills/higress-auto-router && curl -L -o skill.zip "https://mcp.directory/api/skills/download/7069" && unzip -o skill.zip -d .claude/skills/higress-auto-router && rm skill.zip

Installs to .claude/skills/higress-auto-router

About this skill

Higress Auto Router

Configure automatic model routing using the get-ai-gateway.sh CLI tool for intelligent model selection based on message content triggers.

Prerequisites

  • Higress AI Gateway running (container name: higress-ai-gateway)
  • get-ai-gateway.sh script downloaded

CLI Commands

Add a Routing Rule

./get-ai-gateway.sh route add --model <model-name> --trigger "<trigger-phrases>"

Options:

  • --model MODEL (required): Target model to route to
  • --trigger PHRASE: Trigger phrase(s), separated by | (e.g., "深入思考|deep thinking")
  • --pattern REGEX: Custom regex pattern (alternative to --trigger)

Examples:

# Route complex reasoning to Claude
./get-ai-gateway.sh route add \
  --model claude-opus-4.5 \
  --trigger "深入思考|deep thinking"

# Route coding tasks to Qwen Coder
./get-ai-gateway.sh route add \
  --model qwen-coder \
  --trigger "写代码|code:|coding:"

# Route creative writing
./get-ai-gateway.sh route add \
  --model gpt-4o \
  --trigger "创意写作|creative:"

# Use custom regex pattern
./get-ai-gateway.sh route add \
  --model deepseek-chat \
  --pattern "(?i)^(数学题|math:)"

List Routing Rules

./get-ai-gateway.sh route list

Output:

Default model: qwen-turbo

ID   Pattern                                  Model               
----------------------------------------------------------------------
0    (?i)^(深入思考|deep thinking)             claude-opus-4.5     
1    (?i)^(写代码|code:|coding:)               qwen-coder          

Remove a Routing Rule

./get-ai-gateway.sh route remove --rule-id <id>

Example:

# Remove rule with ID 0
./get-ai-gateway.sh route remove --rule-id 0

Common Trigger Mappings

ScenarioSuggested TriggersRecommended Model
Complex reasoning深入思考|deep thinkingclaude-opus-4.5, o1
Coding tasks写代码|code:|coding:qwen-coder, deepseek-coder
Creative writing创意写作|creative:gpt-4o, claude-sonnet
Translation翻译:|translate:gpt-4o, qwen-max
Math problems数学题|math:deepseek-r1, o1-mini
Quick answers快速回答|quick:qwen-turbo, gpt-4o-mini

Usage Flow

  1. User Request: "我希望在解决困难问题时路由到claude-opus-4.5"

  2. Execute CLI:

    ./get-ai-gateway.sh route add \
      --model claude-opus-4.5 \
      --trigger "深入思考|deep thinking"
    
  3. Response to User:

    ✅ 自动路由配置完成!
    
    触发方式:以 "深入思考" 或 "deep thinking" 开头
    目标模型:claude-opus-4.5
    
    使用示例:
    - 深入思考 这道算法题应该怎么解?
    - deep thinking What's the best architecture?
    
    提示:确保请求中 model 参数为 'higress/auto'
    

How Auto-Routing Works

  1. User sends request with model: "higress/auto"
  2. Higress checks message content against routing rules
  3. If a trigger pattern matches, routes to the specified model
  4. If no match, uses the default model (e.g., qwen-turbo)

Configuration File

Rules are stored in the container at:

/data/wasmplugins/model-router.internal.yaml

The CLI tool automatically:

  • Edits the configuration file
  • Triggers hot-reload (no container restart needed)
  • Validates YAML syntax

Error Handling

  • Container not running: Start with ./get-ai-gateway.sh start
  • Rule ID not found: Use route list to see valid IDs
  • Invalid model: Check configured providers in Higress Console

higress-clawdbot-integration

alibaba

Deploy and configure Higress AI Gateway for Clawdbot/OpenClaw integration. Use when: (1) User wants to deploy Higress AI Gateway, (2) User wants to configure Clawdbot/OpenClaw to use Higress as a model provider, (3) User mentions 'higress', 'ai gateway', 'model gateway', 'AI网关', (4) User wants to set up model routing or auto-routing, (5) User needs to manage LLM provider API keys, (6) User wants to track token usage and conversation history.

10

higress-wasm-go-plugin

alibaba

Develop Higress WASM plugins using Go 1.24+. Use when creating, modifying, or debugging Higress gateway plugins for HTTP request/response processing, external service calls, Redis integration, or custom gateway logic.

10

nginx-to-higress-migration

alibaba

Migrate from ingress-nginx to Higress in Kubernetes environments. Use when (1) analyzing existing ingress-nginx setup (2) reading nginx Ingress resources and ConfigMaps (3) installing Higress via helm with proper ingressClass (4) identifying unsupported nginx annotations (5) generating WASM plugins for nginx snippets/advanced features (6) building and deploying custom plugins to image registry. Supports full migration workflow with compatibility analysis and plugin generation.

10

agent-session-monitor

alibaba

Real-time agent conversation monitoring - monitors Higress access logs, aggregates conversations by session, tracks token usage. Supports web interface for viewing complete conversation history and costs. Use when users ask about current session token consumption, conversation history, or cost statistics.

60

higress-daily-report

alibaba

生成 Higress 项目每日报告,追踪 issue/PR 动态,沉淀问题处理经验,驱动社区问题闭环。用于生成日报、跟进 issue、记录解决方案。

10

You might also like

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

9521,094

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

846846

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

571700

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

548492

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

673466

fastapi-templates

wshobson

Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.

514280

Stay ahead of the MCP ecosystem

Get weekly updates on new skills and servers.