mirror of
https://github.com/alibaba/higress.git
synced 2026-04-21 20:17:29 +08:00
docs: add Claude Code mode to higress-clawdbot-integration skill (#3461)
This commit is contained in:
@@ -10,14 +10,14 @@ Deploy and configure Higress AI Gateway for Clawdbot/OpenClaw integration with o
|
|||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
- Docker installed and running
|
- Docker installed and running
|
||||||
- Internet access to download the setup script
|
- Internet access to download setup script
|
||||||
- LLM provider API keys (at least one)
|
- LLM provider API keys (at least one)
|
||||||
|
|
||||||
## Workflow
|
## Workflow
|
||||||
|
|
||||||
### Step 1: Download Setup Script
|
### Step 1: Download Setup Script
|
||||||
|
|
||||||
Download the official get-ai-gateway.sh script:
|
Download official get-ai-gateway.sh script:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl -fsSL https://raw.githubusercontent.com/higress-group/higress-standalone/main/all-in-one/get-ai-gateway.sh -o get-ai-gateway.sh
|
curl -fsSL https://raw.githubusercontent.com/higress-group/higress-standalone/main/all-in-one/get-ai-gateway.sh -o get-ai-gateway.sh
|
||||||
@@ -26,15 +26,17 @@ chmod +x get-ai-gateway.sh
|
|||||||
|
|
||||||
### Step 2: Gather Configuration
|
### Step 2: Gather Configuration
|
||||||
|
|
||||||
Ask the user for:
|
Ask user for:
|
||||||
|
|
||||||
1. **LLM Provider API Keys** (at least one required):
|
1. **LLM Provider API Keys** (at least one required):
|
||||||
|
|
||||||
**Top Commonly Used Providers:**
|
**Top Commonly Used Providers:**
|
||||||
- Aliyun Dashscope (Qwen): `--dashscope-key`
|
- Aliyun Dashscope (Qwen): `--dashscope-key`
|
||||||
- DeepSeek: `--deepseek-key`
|
- DeepSeek: `--deepseek-key`
|
||||||
- Moonshot (Kimi): `--moonshot-key`
|
- Moonshot (Kimi): `--moonshot-key`
|
||||||
- Zhipu AI: `--zhipuai-key`
|
- Zhipu AI: `--zhipuai-key`
|
||||||
|
- Claude Code (OAuth mode): `--claude-code-key` (run `claude setup-token` to get token)
|
||||||
|
- Claude: `--claude-key`
|
||||||
- Minimax: `--minimax-key`
|
- Minimax: `--minimax-key`
|
||||||
- Azure OpenAI: `--azure-key`
|
- Azure OpenAI: `--azure-key`
|
||||||
- AWS Bedrock: `--bedrock-key`
|
- AWS Bedrock: `--bedrock-key`
|
||||||
@@ -42,8 +44,8 @@ Ask the user for:
|
|||||||
- OpenAI: `--openai-key`
|
- OpenAI: `--openai-key`
|
||||||
- OpenRouter: `--openrouter-key`
|
- OpenRouter: `--openrouter-key`
|
||||||
- Grok: `--grok-key`
|
- Grok: `--grok-key`
|
||||||
|
|
||||||
See CLI Parameters Reference for complete list with model pattern options.
|
To configure additional providers beyond the above, run `./get-ai-gateway.sh --help` to view the complete list of supported models and providers.
|
||||||
|
|
||||||
2. **Port Configuration** (optional):
|
2. **Port Configuration** (optional):
|
||||||
- HTTP port: `--http-port` (default: 8080)
|
- HTTP port: `--http-port` (default: 8080)
|
||||||
@@ -56,7 +58,7 @@ Ask the user for:
|
|||||||
|
|
||||||
### Step 3: Run Setup Script
|
### Step 3: Run Setup Script
|
||||||
|
|
||||||
Run the script in non-interactive mode with gathered parameters:
|
Run script in non-interactive mode with gathered parameters:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./get-ai-gateway.sh start --non-interactive \
|
./get-ai-gateway.sh start --non-interactive \
|
||||||
@@ -100,23 +102,23 @@ After script completion:
|
|||||||
docker ps --filter "name=higress-ai-gateway"
|
docker ps --filter "name=higress-ai-gateway"
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Test the gateway endpoint:
|
2. Test gateway endpoint:
|
||||||
```bash
|
```bash
|
||||||
curl http://localhost:8080/v1/models
|
curl http://localhost:8080/v1/models
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Access the console (optional):
|
3. Access console (optional):
|
||||||
```
|
```
|
||||||
http://localhost:8001
|
http://localhost:8001
|
||||||
```
|
```
|
||||||
|
|
||||||
### Step 5: Configure Clawdbot/OpenClaw Plugin
|
### Step 5: Configure Clawdbot/OpenClaw Plugin
|
||||||
|
|
||||||
If the user wants to use Higress with Clawdbot/OpenClaw, install the appropriate plugin:
|
If user wants to use Higress with Clawdbot/OpenClaw, install appropriate plugin:
|
||||||
|
|
||||||
#### Automatic Installation
|
#### Automatic Installation
|
||||||
|
|
||||||
Detect runtime and install the correct plugin version:
|
Detect runtime and install correct plugin version:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Detect which runtime is installed
|
# Detect which runtime is installed
|
||||||
@@ -133,7 +135,7 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install the plugin
|
# Install plugin
|
||||||
PLUGIN_DEST="$RUNTIME_DIR/extensions/higress-ai-gateway"
|
PLUGIN_DEST="$RUNTIME_DIR/extensions/higress-ai-gateway"
|
||||||
echo "Installing Higress AI Gateway plugin for $RUNTIME..."
|
echo "Installing Higress AI Gateway plugin for $RUNTIME..."
|
||||||
mkdir -p "$(dirname "$PLUGIN_DEST")"
|
mkdir -p "$(dirname "$PLUGIN_DEST")"
|
||||||
@@ -142,7 +144,7 @@ cp -r "$PLUGIN_SRC" "$PLUGIN_DEST"
|
|||||||
echo "✓ Plugin installed at: $PLUGIN_DEST"
|
echo "✓ Plugin installed at: $PLUGIN_DEST"
|
||||||
|
|
||||||
# Configure provider
|
# Configure provider
|
||||||
echo
|
echo ""
|
||||||
echo "Configuring provider..."
|
echo "Configuring provider..."
|
||||||
$RUNTIME models auth login --provider higress
|
$RUNTIME models auth login --provider higress
|
||||||
```
|
```
|
||||||
@@ -161,10 +163,8 @@ After deployment, manage API keys without redeploying:
|
|||||||
```bash
|
```bash
|
||||||
# View configured API keys
|
# View configured API keys
|
||||||
./get-ai-gateway.sh config list
|
./get-ai-gateway.sh config list
|
||||||
|
|
||||||
# Add or update an API key (hot-reload, no restart needed)
|
# Add or update an API key (hot-reload, no restart needed)
|
||||||
./get-ai-gateway.sh config add --provider <provider> --key <api-key>
|
./get-ai-gateway.sh config add --provider <provider> --key <api-key>
|
||||||
|
|
||||||
# Remove an API key (hot-reload, no restart needed)
|
# Remove an API key (hot-reload, no restart needed)
|
||||||
./get-ai-gateway.sh config remove --provider <provider>
|
./get-ai-gateway.sh config remove --provider <provider>
|
||||||
```
|
```
|
||||||
@@ -220,13 +220,15 @@ PLUGIN_REGISTRY="higress-registry.ap-southeast-7.cr.aliyuncs.com" \
|
|||||||
| `--deepseek-key` | DeepSeek |
|
| `--deepseek-key` | DeepSeek |
|
||||||
| `--moonshot-key` | Moonshot (Kimi) |
|
| `--moonshot-key` | Moonshot (Kimi) |
|
||||||
| `--zhipuai-key` | Zhipu AI |
|
| `--zhipuai-key` | Zhipu AI |
|
||||||
|
| `--claude-code-key` | Claude Code (OAuth mode - run `claude setup-token` to get token) |
|
||||||
|
| `--claude-key` | Claude |
|
||||||
| `--openai-key` | OpenAI |
|
| `--openai-key` | OpenAI |
|
||||||
| `--openrouter-key` | OpenRouter |
|
| `--openrouter-key` | OpenRouter |
|
||||||
| `--claude-key` | Claude |
|
|
||||||
| `--gemini-key` | Google Gemini |
|
| `--gemini-key` | Google Gemini |
|
||||||
| `--groq-key` | Groq |
|
| `--groq-key` | Groq |
|
||||||
|
|
||||||
**Additional Providers:**
|
**Additional Providers:**
|
||||||
|
|
||||||
`--doubao-key`, `--baichuan-key`, `--yi-key`, `--stepfun-key`, `--minimax-key`, `--cohere-key`, `--mistral-key`, `--github-key`, `--fireworks-key`, `--togetherai-key`, `--grok-key`, `--azure-key`, `--bedrock-key`, `--vertex-key`
|
`--doubao-key`, `--baichuan-key`, `--yi-key`, `--stepfun-key`, `--minimax-key`, `--cohere-key`, `--mistral-key`, `--github-key`, `--fireworks-key`, `--togetherai-key`, `--grok-key`, `--azure-key`, `--bedrock-key`, `--vertex-key`
|
||||||
|
|
||||||
## Managing Configuration
|
## Managing Configuration
|
||||||
@@ -236,15 +238,14 @@ PLUGIN_REGISTRY="higress-registry.ap-southeast-7.cr.aliyuncs.com" \
|
|||||||
```bash
|
```bash
|
||||||
# List all configured API keys
|
# List all configured API keys
|
||||||
./get-ai-gateway.sh config list
|
./get-ai-gateway.sh config list
|
||||||
|
|
||||||
# Add or update an API key (hot-reload)
|
# Add or update an API key (hot-reload)
|
||||||
./get-ai-gateway.sh config add --provider deepseek --key sk-xxx
|
./get-ai-gateway.sh config add --provider deepseek --key sk-xxx
|
||||||
|
|
||||||
# Remove an API key (hot-reload)
|
# Remove an API key (hot-reload)
|
||||||
./get-ai-gateway.sh config remove --provider deepseek
|
./get-ai-gateway.sh config remove --provider deepseek
|
||||||
```
|
```
|
||||||
|
|
||||||
**Supported provider aliases:**
|
**Supported provider aliases:**
|
||||||
|
|
||||||
`dashscope`/`qwen`, `moonshot`/`kimi`, `zhipuai`/`zhipu`, `togetherai`/`together`
|
`dashscope`/`qwen`, `moonshot`/`kimi`, `zhipuai`/`zhipu`, `togetherai`/`together`
|
||||||
|
|
||||||
### Routing Rules
|
### Routing Rules
|
||||||
@@ -252,10 +253,8 @@ PLUGIN_REGISTRY="higress-registry.ap-southeast-7.cr.aliyuncs.com" \
|
|||||||
```bash
|
```bash
|
||||||
# Add a routing rule
|
# Add a routing rule
|
||||||
./get-ai-gateway.sh route add --model claude-opus-4.5 --trigger "深入思考|deep thinking"
|
./get-ai-gateway.sh route add --model claude-opus-4.5 --trigger "深入思考|deep thinking"
|
||||||
|
|
||||||
# List all rules
|
# List all rules
|
||||||
./get-ai-gateway.sh route list
|
./get-ai-gateway.sh route list
|
||||||
|
|
||||||
# Remove a rule
|
# Remove a rule
|
||||||
./get-ai-gateway.sh route remove --rule-id 0
|
./get-ai-gateway.sh route remove --rule-id 0
|
||||||
```
|
```
|
||||||
@@ -265,11 +264,12 @@ See [higress-auto-router](../higress-auto-router/SKILL.md) for detailed document
|
|||||||
## Access Logs
|
## Access Logs
|
||||||
|
|
||||||
Gateway access logs are available at:
|
Gateway access logs are available at:
|
||||||
|
|
||||||
```
|
```
|
||||||
$DATA_FOLDER/logs/access.log
|
$DATA_FOLDER/logs/access.log
|
||||||
```
|
```
|
||||||
|
|
||||||
These logs can be used with the **agent-session-monitor** skill for token tracking and conversation analysis.
|
These logs can be used with **agent-session-monitor** skill for token tracking and conversation analysis.
|
||||||
|
|
||||||
## Related Skills
|
## Related Skills
|
||||||
|
|
||||||
@@ -295,6 +295,7 @@ These logs can be used with the **agent-session-monitor** skill for token tracki
|
|||||||
```
|
```
|
||||||
|
|
||||||
**Response:**
|
**Response:**
|
||||||
|
|
||||||
```
|
```
|
||||||
Auto-detected timezone: Asia/Shanghai
|
Auto-detected timezone: Asia/Shanghai
|
||||||
Selected plugin registry: higress-registry.cn-hangzhou.cr.aliyuncs.com
|
Selected plugin registry: higress-registry.cn-hangzhou.cr.aliyuncs.com
|
||||||
@@ -325,6 +326,7 @@ curl 'http://localhost:8080/v1/chat/completions' \
|
|||||||
4. Set up session monitoring
|
4. Set up session monitoring
|
||||||
|
|
||||||
**Response:**
|
**Response:**
|
||||||
|
|
||||||
```
|
```
|
||||||
Auto-detected timezone: Asia/Shanghai
|
Auto-detected timezone: Asia/Shanghai
|
||||||
Selected plugin registry: higress-registry.cn-hangzhou.cr.aliyuncs.com
|
Selected plugin registry: higress-registry.cn-hangzhou.cr.aliyuncs.com
|
||||||
@@ -366,6 +368,7 @@ Selected plugin registry: higress-registry.cn-hangzhou.cr.aliyuncs.com
|
|||||||
```
|
```
|
||||||
|
|
||||||
**Response:**
|
**Response:**
|
||||||
|
|
||||||
```
|
```
|
||||||
当前配置的API keys:
|
当前配置的API keys:
|
||||||
|
|
||||||
@@ -399,6 +402,7 @@ Configuration has been hot-reloaded (no restart needed).
|
|||||||
```
|
```
|
||||||
|
|
||||||
**Response:**
|
**Response:**
|
||||||
|
|
||||||
```
|
```
|
||||||
Auto-detected timezone: America/Los_Angeles
|
Auto-detected timezone: America/Los_Angeles
|
||||||
Selected plugin registry: higress-registry.us-west-1.cr.aliyuncs.com
|
Selected plugin registry: higress-registry.us-west-1.cr.aliyuncs.com
|
||||||
|
|||||||
Reference in New Issue
Block a user