Skip to content

refactor: remove Clawdbot integration logic from get-ai-gateway.sh#235

Merged
johnlanni merged 1 commit into
higress-group:mainfrom
johnlanni:refactor/remove-clawdbot-integration-from-setup
Feb 1, 2026
Merged

refactor: remove Clawdbot integration logic from get-ai-gateway.sh#235
johnlanni merged 1 commit into
higress-group:mainfrom
johnlanni:refactor/remove-clawdbot-integration-from-setup

Conversation

@johnlanni
Copy link
Copy Markdown
Contributor

Summary

This PR removes Clawdbot integration configuration logic from get-ai-gateway.sh and moves it to the higress-clawdbot-integration SKILL in the higress repository as an independent script.

Changes

Removed (121 lines total):

  1. Functions:

    • configureClawdbotIntegration() (96 lines) - Interactive Clawdbot setup
    • checkClawdbot() (6 lines) - Clawdbot detection
    • installFiles() (25 lines) - Generic file installer
  2. Variable Definitions (3 lines):

    • CLAWDBOT_WORKSPACE
    • CLAWDBOT_EXTENSIONS_DIR
    • CLAWDBOT_INTEGRATION_DIR
  3. Integration Info Display (18 lines):

    • Success message Clawdbot section removed
  4. Function Calls:

    • Removed configureClawdbotIntegration call in runConfigWizard
    • Removed checkClawdbot call in success message

Rationale

Separation of Concerns:
Previously, Clawdbot integration logic was embedded in the setup script (get-ai-gateway.sh). This PR extracts it to a dedicated location:

Better Maintenance: Integration logic now lives in the SKILL, easier to update
Independent Versioning: SKILL can be updated without touching setup script
Clearer Documentation: Setup vs integration are separate concerns
Reduced Complexity: get-ai-gateway.sh focuses solely on gateway deployment

New Integration Path:
Integration logic is now available in the higress repository as:

  • Location: .claude/skills/higress-clawdbot-integration/configure-clawdbot.sh
  • Features: Auto-detect, interactive config, apply to Higress, provider auth

Migration Guide

Before (integrated):

./get-ai-gateway.sh start  # Would auto-detect and configure Clawdbot

After (separate):

# 1. Deploy Higress AI Gateway
./get-ai-gateway.sh start --non-interactive --dashscope-key sk-xxx

# 2. Configure Clawdbot integration (if needed)
cd .claude/skills/higress-clawdbot-integration
./configure-clawdbot.sh setup

# Or manually
clawdbot models auth login --provider higress

Testing

Verified:

  • ✅ Script syntax check passes (bash -n)
  • ✅ No Clawdbot references remain
  • ✅ All Clawdbot functions removed
  • configureAutoRouting function intact (was partially affected during removal)

Tested deployment:

./get-ai-gateway.sh start --non-interactive \
  --dashscope-key sk-xxx \
  --auto-routing \
  --auto-routing-default-model qwen-turbo

Result: ✅ Deployment successful, no Clawdbot references in output

Related

Benefits

Cleaner separation: Setup script vs integration script
Better UX: Users can choose when/if to integrate with Clawdbot
Easier testing: Integration can be tested independently
Reduced coupling: Higress setup doesn't depend on Clawdbot detection
Improved maintainability: Integration logic in SKILL, easier to update


Note: This PR is based on the latest main branch (after PR #219 merge) and creates a clean separation between Higress deployment and Clawdbot integration.

Moved Clawdbot integration configuration to the higress-clawdbot-integration
SKILL in the higress repository for better separation of concerns.

**Removed:**
- `configureClawdbotIntegration()` function (96 lines)
- `checkClawdbot()` function (6 lines)
- `installFiles()` generic helper function (25 lines)
- Clawdbot-related variable definitions (3 lines):
  - CLAWDBOT_WORKSPACE
  - CLAWDBOT_EXTENSIONS_DIR
  - CLAWDBOT_INTEGRATION_DIR
- Clawdbot integration info display in success message (18 lines)
- Related function call in runConfigWizard
- Related comments

**Total lines removed:** 121

**Rationale:**
Integration logic is now maintained in the higress repository as an
independent script (`configure-clawdbot.sh`) within the
higress-clawdbot-integration SKILL. This provides:

✅ Better separation of concerns (setup vs integration)
✅ Easier maintenance (integration logic in one place)
✅ Independent versioning (SKILL can be updated independently)
✅ Clearer documentation flow
✅ Reduced complexity in get-ai-gateway.sh

**Migration Path:**
Users can now configure Clawdbot integration using:
```bash
cd .claude/skills/higress-clawdbot-integration
./configure-clawdbot.sh setup
```

Or manually:
```bash
clawdbot models auth login --provider higress
```

**Related:**
- Higress PR: higress-group/higress#3435 (higress-clawdbot-integration SKILL update)
@johnlanni johnlanni requested a review from CH3CHO as a code owner February 1, 2026 13:14
@lingma-agents
Copy link
Copy Markdown

lingma-agents Bot commented Feb 1, 2026

🔍 代码审查进行中

⏳ 正在审查

⏰️ 剩余时间:约需数分钟

🔄 分支流向: refactor/remove-clawdbot-integration-from-setupmain

📦 提交: 审查当前PR从2988a07d6bda5f的提交。


📒 文件清单 (1 个文件)
📝 变更: 1 个文件

📝 变更文件:

  • all-in-one/get-ai-gateway.sh

@johnlanni johnlanni merged commit 0dc8bd9 into higress-group:main Feb 1, 2026
3 of 4 checks passed
@lingma-agents
Copy link
Copy Markdown

lingma-agents Bot commented Feb 1, 2026

CodeReview流程已终止

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