Skip to content

feat: integrate with Clawdbot for auto-routing and model provider#221

Merged
johnlanni merged 2 commits into
mainfrom
feat/clawdbot-integration-v2
Jan 29, 2026
Merged

feat: integrate with Clawdbot for auto-routing and model provider#221
johnlanni merged 2 commits into
mainfrom
feat/clawdbot-integration-v2

Conversation

@johnlanni
Copy link
Copy Markdown
Contributor

概述

本 PR 为 Higress AI Gateway 添加了与 Clawdbot 的深度集成,支持基于消息内容的自动路由功能。

主要改动

1. 安装脚本 (all-in-one/get-ai-gateway.sh)

  • 自动检测 Clawdbot 安装 (~/clawd 目录)
  • 交互式配置自动路由功能
  • 容器内直接修改配置文件,支持热加载(无需重启)
  • 自动安装 Clawdbot plugin 和 skill

2. Clawdbot Plugin

  • 基于 API Key 认证的模型 provider
  • 支持 higress/auto 自动路由模型
  • 交互式配置向导

3. Higress Auto Router Skill

  • 自然语言配置路由规则
  • 生成易记的触发短语(深入思考/deep thinking)
  • 直接在容器内修改配置,热加载生效

使用方式

./get-ai-gateway.sh
# 选择启用自动路由
# 自动安装 Clawdbot 集成

clawdbot models auth login --provider higress
# 告诉 Clawdbot: "route to claude-opus-4.5 when solving difficult problems"

已修复的问题

  • 避免 model ref 双重前缀 (higress/higress/auto)
  • spinner 实例分离
  • 用户输入 trim()
  • macOS/Linux 跨平台兼容 (awk 替代 sed)
  • 容器重启后正确显示配置信息
  • 热加载支持(docker exec touch)

Replaces #220

- Enhanced get-ai-gateway.sh to detect Clawdbot installation
- Added interactive prompt for enabling auto-routing feature
- Added configuration for default model in auto-routing mode
- Direct modification of model-router config inside container (no restart)
- Created Higress AI Gateway plugin for Clawdbot (API Key auth)
- Created Higress Auto Router skill for natural language routing config

Fixed issues from review:
- Avoid double prefix for model refs (higress/higress/auto)
- Separate spinner instances for different progress steps
- Add trim() to user inputs
- Use awk for cross-platform compatibility (macOS/Linux)
- Load saved config on container restart for welcome message
- Trigger hot-reload via docker exec touch
@johnlanni johnlanni requested a review from CH3CHO as a code owner January 29, 2026 01:52
@cursor
Copy link
Copy Markdown

cursor Bot commented Jan 29, 2026

You have run out of free Bugbot PR reviews for this billing cycle. This will reset on February 8.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@johnlanni johnlanni merged commit c2d425e into main Jan 29, 2026
3 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