mirror of
https://github.com/alibaba/higress.git
synced 2026-06-09 20:57:32 +08:00
refactor: rename skill to higress-openclaw-integration and update model configs (#3475)
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
---
|
---
|
||||||
name: higress-clawdbot-integration
|
name: higress-openclaw-integration
|
||||||
description: "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."
|
description: "Deploy and configure Higress AI Gateway for OpenClaw integration. Use when: (1) User wants to deploy Higress AI Gateway, (2) User wants to configure 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."
|
||||||
---
|
---
|
||||||
|
|
||||||
# Higress AI Gateway Integration
|
# Higress AI Gateway Integration
|
||||||
|
|
||||||
Deploy and configure Higress AI Gateway for Clawdbot/OpenClaw integration with one-click deployment, model provider configuration, auto-routing, and session monitoring.
|
Deploy and configure Higress AI Gateway for OpenClaw integration with one-click deployment, model provider configuration, and auto-routing.
|
||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
@@ -112,28 +112,17 @@ After script completion:
|
|||||||
http://localhost:8001
|
http://localhost:8001
|
||||||
```
|
```
|
||||||
|
|
||||||
### Step 5: Configure Clawdbot/OpenClaw Plugin
|
### Step 5: Configure OpenClaw Plugin
|
||||||
|
|
||||||
If user wants to use Higress with Clawdbot/OpenClaw, install appropriate plugin:
|
If user wants to use Higress with OpenClaw, install the plugin:
|
||||||
|
|
||||||
#### Automatic Installation
|
#### Automatic Installation
|
||||||
|
|
||||||
Detect runtime and install correct plugin version:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Detect which runtime is installed
|
# Install plugin for OpenClaw
|
||||||
if command -v clawdbot &> /dev/null; then
|
RUNTIME="openclaw"
|
||||||
RUNTIME="clawdbot"
|
RUNTIME_DIR="$HOME/.openclaw"
|
||||||
RUNTIME_DIR="$HOME/.clawdbot"
|
PLUGIN_SRC="scripts/plugin"
|
||||||
PLUGIN_SRC="scripts/plugin-clawdbot"
|
|
||||||
elif command -v openclaw &> /dev/null; then
|
|
||||||
RUNTIME="openclaw"
|
|
||||||
RUNTIME_DIR="$HOME/.openclaw"
|
|
||||||
PLUGIN_SRC="scripts/plugin"
|
|
||||||
else
|
|
||||||
echo "Error: Neither clawdbot nor openclaw is installed"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Install plugin
|
# Install plugin
|
||||||
PLUGIN_DEST="$RUNTIME_DIR/extensions/higress-ai-gateway"
|
PLUGIN_DEST="$RUNTIME_DIR/extensions/higress-ai-gateway"
|
||||||
@@ -155,6 +144,8 @@ The plugin will guide you through an interactive setup for:
|
|||||||
3. API Key (optional for local deployments)
|
3. API Key (optional for local deployments)
|
||||||
4. Model list (auto-detected or manually specified)
|
4. Model list (auto-detected or manually specified)
|
||||||
5. Auto-routing default model (if using `higress/auto`)
|
5. Auto-routing default model (if using `higress/auto`)
|
||||||
|
4. Model list (auto-detected or manually specified)
|
||||||
|
5. Auto-routing default model (if using `higress/auto`)
|
||||||
|
|
||||||
### Step 6: Manage API Keys (optional)
|
### Step 6: Manage API Keys (optional)
|
||||||
|
|
||||||
@@ -269,16 +260,11 @@ Gateway access logs are available at:
|
|||||||
$DATA_FOLDER/logs/access.log
|
$DATA_FOLDER/logs/access.log
|
||||||
```
|
```
|
||||||
|
|
||||||
These logs can be used with **agent-session-monitor** skill for token tracking and conversation analysis.
|
|
||||||
|
|
||||||
## Related Skills
|
## Related Skills
|
||||||
|
|
||||||
- **higress-auto-router**: Configure automatic model routing using CLI commands
|
- **higress-auto-router**: Configure automatic model routing using CLI commands
|
||||||
See: [higress-auto-router](../higress-auto-router/SKILL.md)
|
See: [higress-auto-router](../higress-auto-router/SKILL.md)
|
||||||
|
|
||||||
- **agent-session-monitor**: Monitor and track token usage across sessions
|
|
||||||
See: [agent-session-monitor](../agent-session-monitor/SKILL.md)
|
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
### Example 1: Basic Deployment with Dashscope
|
### Example 1: Basic Deployment with Dashscope
|
||||||
@@ -315,15 +301,14 @@ curl 'http://localhost:8080/v1/chat/completions' \
|
|||||||
-d '{"model": "qwen-turbo", "messages": [{"role": "user", "content": "Hello!"}]}'
|
-d '{"model": "qwen-turbo", "messages": [{"role": "user", "content": "Hello!"}]}'
|
||||||
```
|
```
|
||||||
|
|
||||||
### Example 2: Full Integration with Clawdbot
|
### Example 2: Full Integration with OpenClaw
|
||||||
|
|
||||||
**User:** 完整配置Higress和Clawdbot的集成
|
**User:** 完整配置Higress和OpenClaw的集成
|
||||||
|
|
||||||
**Steps:**
|
**Steps:**
|
||||||
1. Deploy Higress AI Gateway (auto-detects timezone)
|
1. Deploy Higress AI Gateway (auto-detects timezone)
|
||||||
2. Install and configure Clawdbot plugin
|
2. Install and configure OpenClaw plugin
|
||||||
3. Enable auto-routing
|
3. Enable auto-routing
|
||||||
4. Set up session monitoring
|
|
||||||
|
|
||||||
**Response:**
|
**Response:**
|
||||||
|
|
||||||
@@ -339,16 +324,13 @@ Selected plugin registry: higress-registry.cn-hangzhou.cr.aliyuncs.com
|
|||||||
- 容器镜像: Hangzhou (自动选择)
|
- 容器镜像: Hangzhou (自动选择)
|
||||||
- 插件镜像: Hangzhou (自动选择)
|
- 插件镜像: Hangzhou (自动选择)
|
||||||
|
|
||||||
2. Clawdbot 插件配置:
|
2. OpenClaw 插件配置:
|
||||||
Plugin installed at: /root/.clawdbot/extensions/higress-ai-gateway
|
Plugin installed at: /root/.openclaw/extensions/higress-ai-gateway
|
||||||
Run: clawdbot models auth login --provider higress
|
Run: openclaw models auth login --provider higress
|
||||||
|
|
||||||
3. 自动路由:
|
3. 自动路由:
|
||||||
已启用,使用 model="higress/auto"
|
已启用,使用 model="higress/auto"
|
||||||
|
|
||||||
4. 会话监控:
|
|
||||||
日志路径: ./higress/logs/access.log
|
|
||||||
|
|
||||||
需要我帮你配置自动路由规则吗?
|
需要我帮你配置自动路由规则吗?
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ This is a TypeScript-based provider plugin that enables Clawdbot to use Higress
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
This plugin is automatically installed when you use the `higress-clawdbot-integration` skill. See the parent SKILL.md for complete installation instructions.
|
This plugin is automatically installed when you use the `higress-openclaw-integration` skill. See parent SKILL.md for complete installation instructions.
|
||||||
|
|
||||||
### Manual Installation
|
### Manual Installation
|
||||||
|
|
||||||
@@ -64,9 +64,8 @@ clawdbot chat --model higress/auto "深入思考 这个问题应该怎么解决?
|
|||||||
|
|
||||||
## Related Resources
|
## Related Resources
|
||||||
|
|
||||||
- **Parent Skill**: [higress-clawdbot-integration](../SKILL.md)
|
- **Parent Skill**: [higress-openclaw-integration](../SKILL.md)
|
||||||
- **Auto-routing Configuration**: [higress-auto-router](../../higress-auto-router/SKILL.md)
|
- **Auto-routing Configuration**: [higress-auto-router](../../higress-auto-router/SKILL.md)
|
||||||
- **Session Monitoring**: [agent-session-monitor](../../agent-session-monitor/SKILL.md)
|
|
||||||
- **Higress AI Gateway**: https://github.com/higress-group/higress-standalone
|
- **Higress AI Gateway**: https://github.com/higress-group/higress-standalone
|
||||||
|
|
||||||
## Compatibility
|
## Compatibility
|
||||||
@@ -2,32 +2,47 @@ import { emptyPluginConfigSchema } from "clawdbot/plugin-sdk";
|
|||||||
|
|
||||||
const DEFAULT_GATEWAY_URL = "http://localhost:8080";
|
const DEFAULT_GATEWAY_URL = "http://localhost:8080";
|
||||||
const DEFAULT_CONSOLE_URL = "http://localhost:8001";
|
const DEFAULT_CONSOLE_URL = "http://localhost:8001";
|
||||||
|
|
||||||
|
// Model-specific context window and max tokens configurations
|
||||||
|
const MODEL_CONFIG: Record<string, { contextWindow: number; maxTokens: number }> = {
|
||||||
|
"gpt-5.3-codex": { contextWindow: 400_000, maxTokens: 128_000 },
|
||||||
|
"gpt-5-mini": { contextWindow: 400_000, maxTokens: 128_000 },
|
||||||
|
"gpt-5-nano": { contextWindow: 400_000, maxTokens: 128_000 },
|
||||||
|
"claude-opus-4.6": { contextWindow: 1_000_000, maxTokens: 128_000 },
|
||||||
|
"claude-sonnet-4.5": { contextWindow: 1_000_000, maxTokens: 64_000 },
|
||||||
|
"claude-haiku-4.5": { contextWindow: 200_000, maxTokens: 64_000 },
|
||||||
|
"qwen3-coder-plus": { contextWindow: 1_000_000, maxTokens: 64_000 },
|
||||||
|
"deepseek-chat": { contextWindow: 256_000, maxTokens: 128_000 },
|
||||||
|
"deepseek-reasoner": { contextWindow: 256_000, maxTokens: 128_000 },
|
||||||
|
"kimi-k2.5": { contextWindow: 256_000, maxTokens: 128_000 },
|
||||||
|
"glm-5": { contextWindow: 200_000, maxTokens: 128_000 },
|
||||||
|
"MiniMax-M2.1": { contextWindow: 196_000, maxTokens: 196_000 },
|
||||||
|
};
|
||||||
|
|
||||||
|
// Default values for unknown models
|
||||||
const DEFAULT_CONTEXT_WINDOW = 128_000;
|
const DEFAULT_CONTEXT_WINDOW = 128_000;
|
||||||
const DEFAULT_MAX_TOKENS = 8192;
|
const DEFAULT_MAX_TOKENS = 8_192;
|
||||||
|
|
||||||
// Common models that Higress AI Gateway typically supports
|
// Common models that Higress AI Gateway typically supports
|
||||||
const DEFAULT_MODEL_IDS = [
|
const DEFAULT_MODEL_IDS = [
|
||||||
// Auto-routing special model
|
// Auto-routing special model
|
||||||
"higress/auto",
|
"higress/auto",
|
||||||
// OpenAI models
|
// OpenAI models
|
||||||
"gpt-5.2",
|
"gpt-5.3-codex",
|
||||||
"gpt-5-mini",
|
"gpt-5-mini",
|
||||||
"gpt-5-nano",
|
"gpt-5-nano",
|
||||||
// Anthropic models
|
// Anthropic models
|
||||||
"claude-opus-4.5",
|
"claude-opus-4.6",
|
||||||
"claude-sonnet-4.5",
|
"claude-sonnet-4.5",
|
||||||
"claude-haiku-4.5",
|
"claude-haiku-4.5",
|
||||||
// Qwen models
|
// Qwen models
|
||||||
"qwen3-turbo",
|
"qwen3-coder-plus",
|
||||||
"qwen3-plus",
|
|
||||||
"qwen3-max",
|
|
||||||
"qwen3-coder-480b-a35b-instruct",
|
|
||||||
// DeepSeek models
|
// DeepSeek models
|
||||||
"deepseek-chat",
|
"deepseek-chat",
|
||||||
"deepseek-reasoner",
|
"deepseek-reasoner",
|
||||||
// Other common models
|
// Other common models
|
||||||
"kimi-k2.5",
|
"kimi-k2.5",
|
||||||
"glm-4.7",
|
"glm-5",
|
||||||
"MiniMax-M2.1",
|
"MiniMax-M2.1",
|
||||||
] as const;
|
] as const;
|
||||||
|
|
||||||
@@ -60,15 +75,17 @@ function parseModelIds(input: string): string[] {
|
|||||||
|
|
||||||
function buildModelDefinition(modelId: string) {
|
function buildModelDefinition(modelId: string) {
|
||||||
const isAutoModel = modelId === "higress/auto";
|
const isAutoModel = modelId === "higress/auto";
|
||||||
|
const config = MODEL_CONFIG[modelId] || { contextWindow: DEFAULT_CONTEXT_WINDOW, maxTokens: DEFAULT_MAX_TOKENS };
|
||||||
|
|
||||||
return {
|
return {
|
||||||
id: modelId,
|
id: modelId,
|
||||||
name: isAutoModel ? "Higress Auto Router" : modelId,
|
name: isAutoModel ? "Higress Auto Router" : modelId,
|
||||||
api: "openai-completions",
|
api: "openai-completions",
|
||||||
reasoning: false,
|
reasoning: true,
|
||||||
input: ["text", "image"],
|
input: ["text", "image"],
|
||||||
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
|
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
|
||||||
contextWindow: DEFAULT_CONTEXT_WINDOW,
|
contextWindow: config.contextWindow,
|
||||||
maxTokens: DEFAULT_MAX_TOKENS,
|
maxTokens: config.maxTokens,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -261,17 +278,12 @@ const higressPlugin = {
|
|||||||
`Gateway endpoint: ${gatewayUrl}/v1/chat/completions`,
|
`Gateway endpoint: ${gatewayUrl}/v1/chat/completions`,
|
||||||
`Console: ${consoleUrl}`,
|
`Console: ${consoleUrl}`,
|
||||||
"",
|
"",
|
||||||
"🎯 Recommended Skills (install via Clawdbot conversation):",
|
"🎯 Recommended Skills (install via OpenClaw conversation):",
|
||||||
"",
|
"",
|
||||||
"1. Auto-Routing Skill:",
|
"1. Auto-Routing Skill:",
|
||||||
" Configure automatic model routing based on message content",
|
" Configure automatic model routing based on message content",
|
||||||
" https://github.com/alibaba/higress/tree/main/.claude/skills/higress-auto-router",
|
" https://github.com/alibaba/higress/tree/main/.claude/skills/higress-auto-router",
|
||||||
' Say: "Install higress-auto-router skill"',
|
' Say: "Install higress-auto-router skill"',
|
||||||
"",
|
|
||||||
"2. Agent Session Monitor Skill:",
|
|
||||||
" Track token usage and monitor conversation history",
|
|
||||||
" https://github.com/alibaba/higress/tree/main/.claude/skills/agent-session-monitor",
|
|
||||||
' Say: "Install agent-session-monitor skill"',
|
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
# Higress AI Gateway Plugin
|
# Higress AI Gateway Plugin
|
||||||
|
|
||||||
OpenClaw/Clawdbot model provider plugin for Higress AI Gateway with auto-routing support.
|
OpenClaw model provider plugin for Higress AI Gateway with auto-routing support.
|
||||||
|
|
||||||
## What is this?
|
## What is this?
|
||||||
|
|
||||||
This is a TypeScript-based provider plugin that enables Clawdbot and OpenClaw to use Higress AI Gateway as a model provider. It provides:
|
This is a TypeScript-based provider plugin that enables OpenClaw to use Higress AI Gateway as a model provider. It provides:
|
||||||
|
|
||||||
- **Auto-routing support**: Use `higress/auto` to intelligently route requests based on message content
|
- **Auto-routing support**: Use `higress/auto` to intelligently route requests based on message content
|
||||||
- **Dynamic model discovery**: Auto-detect available models from Higress Console
|
- **Dynamic model discovery**: Auto-detect available models from Higress Console
|
||||||
@@ -19,30 +19,18 @@ This is a TypeScript-based provider plugin that enables Clawdbot and OpenClaw to
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
This plugin is automatically installed when you use the `higress-clawdbot-integration` skill. See the parent SKILL.md for complete installation instructions.
|
This plugin is automatically installed when you use the `higress-openclaw-integration` skill. See parent SKILL.md for complete installation instructions.
|
||||||
|
|
||||||
### Manual Installation
|
### Manual Installation
|
||||||
|
|
||||||
If you need to install manually:
|
If you need to install manually:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Detect runtime
|
|
||||||
if command -v clawdbot &> /dev/null; then
|
|
||||||
RUNTIME_DIR="$HOME/.clawdbot"
|
|
||||||
elif command -v openclaw &> /dev/null; then
|
|
||||||
RUNTIME_DIR="$HOME/.openclaw"
|
|
||||||
else
|
|
||||||
echo "Error: Neither clawdbot nor openclaw is installed"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Copy plugin files
|
# Copy plugin files
|
||||||
mkdir -p "$RUNTIME_DIR/extensions/higress-ai-gateway"
|
mkdir -p "$HOME/.openclaw/extensions/higress-ai-gateway"
|
||||||
cp -r ./* "$RUNTIME_DIR/extensions/higress-ai-gateway/"
|
cp -r ./* "$HOME/.openclaw/extensions/higress-ai-gateway/"
|
||||||
|
|
||||||
# Configure provider
|
# Configure provider
|
||||||
clawdbot models auth login --provider higress
|
|
||||||
# or
|
|
||||||
openclaw models auth login --provider higress
|
openclaw models auth login --provider higress
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -51,7 +39,7 @@ openclaw models auth login --provider higress
|
|||||||
After installation, configure Higress as a model provider:
|
After installation, configure Higress as a model provider:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
clawdbot models auth login --provider higress
|
openclaw models auth login --provider higress
|
||||||
```
|
```
|
||||||
|
|
||||||
The plugin will prompt for:
|
The plugin will prompt for:
|
||||||
@@ -67,7 +55,7 @@ To use auto-routing, include `higress/auto` in your model list during configurat
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Use auto-routing
|
# Use auto-routing
|
||||||
clawdbot chat --model higress/auto "深入思考 这个问题应该怎么解决?"
|
openclaw chat --model higress/auto "深入思考 这个问题应该怎么解决?"
|
||||||
|
|
||||||
# The gateway will automatically route to the appropriate model based on:
|
# The gateway will automatically route to the appropriate model based on:
|
||||||
# - Message content triggers (configured via higress-auto-router skill)
|
# - Message content triggers (configured via higress-auto-router skill)
|
||||||
@@ -76,15 +64,13 @@ clawdbot chat --model higress/auto "深入思考 这个问题应该怎么解决?
|
|||||||
|
|
||||||
## Related Resources
|
## Related Resources
|
||||||
|
|
||||||
- **Parent Skill**: [higress-clawdbot-integration](../SKILL.md)
|
- **Parent Skill**: [higress-openclaw-integration](../SKILL.md)
|
||||||
- **Auto-routing Configuration**: [higress-auto-router](../../higress-auto-router/SKILL.md)
|
- **Auto-routing Configuration**: [higress-auto-router](../../higress-auto-router/SKILL.md)
|
||||||
- **Session Monitoring**: [agent-session-monitor](../../agent-session-monitor/SKILL.md)
|
|
||||||
- **Higress AI Gateway**: https://github.com/higress-group/higress-standalone
|
- **Higress AI Gateway**: https://github.com/higress-group/higress-standalone
|
||||||
|
|
||||||
## Compatibility
|
## Compatibility
|
||||||
|
|
||||||
- **OpenClaw**: v2.0.0+
|
- **OpenClaw**: v2.0.0+
|
||||||
- **Clawdbot**: v2.0.0+
|
|
||||||
- **Higress AI Gateway**: All versions
|
- **Higress AI Gateway**: All versions
|
||||||
|
|
||||||
## License
|
## License
|
||||||
@@ -2,32 +2,47 @@ import { emptyPluginConfigSchema } from "openclaw/plugin-sdk";
|
|||||||
|
|
||||||
const DEFAULT_GATEWAY_URL = "http://localhost:8080";
|
const DEFAULT_GATEWAY_URL = "http://localhost:8080";
|
||||||
const DEFAULT_CONSOLE_URL = "http://localhost:8001";
|
const DEFAULT_CONSOLE_URL = "http://localhost:8001";
|
||||||
|
|
||||||
|
// Model-specific context window and max tokens configurations
|
||||||
|
const MODEL_CONFIG: Record<string, { contextWindow: number; maxTokens: number }> = {
|
||||||
|
"gpt-5.3-codex": { contextWindow: 400_000, maxTokens: 128_000 },
|
||||||
|
"gpt-5-mini": { contextWindow: 400_000, maxTokens: 128_000 },
|
||||||
|
"gpt-5-nano": { contextWindow: 400_000, maxTokens: 128_000 },
|
||||||
|
"claude-opus-4.6": { contextWindow: 1_000_000, maxTokens: 128_000 },
|
||||||
|
"claude-sonnet-4.5": { contextWindow: 1_000_000, maxTokens: 64_000 },
|
||||||
|
"claude-haiku-4.5": { contextWindow: 200_000, maxTokens: 64_000 },
|
||||||
|
"qwen3-coder-plus": { contextWindow: 1_000_000, maxTokens: 64_000 },
|
||||||
|
"deepseek-chat": { contextWindow: 256_000, maxTokens: 128_000 },
|
||||||
|
"deepseek-reasoner": { contextWindow: 256_000, maxTokens: 128_000 },
|
||||||
|
"kimi-k2.5": { contextWindow: 256_000, maxTokens: 128_000 },
|
||||||
|
"glm-5": { contextWindow: 200_000, maxTokens: 128_000 },
|
||||||
|
"MiniMax-M2.1": { contextWindow: 196_000, maxTokens: 196_000 },
|
||||||
|
};
|
||||||
|
|
||||||
|
// Default values for unknown models
|
||||||
const DEFAULT_CONTEXT_WINDOW = 128_000;
|
const DEFAULT_CONTEXT_WINDOW = 128_000;
|
||||||
const DEFAULT_MAX_TOKENS = 8192;
|
const DEFAULT_MAX_TOKENS = 8_192;
|
||||||
|
|
||||||
// Common models that Higress AI Gateway typically supports
|
// Common models that Higress AI Gateway typically supports
|
||||||
const DEFAULT_MODEL_IDS = [
|
const DEFAULT_MODEL_IDS = [
|
||||||
// Auto-routing special model
|
// Auto-routing special model
|
||||||
"higress/auto",
|
"higress/auto",
|
||||||
// OpenAI models
|
// OpenAI models
|
||||||
"gpt-5.2",
|
"gpt-5.3-codex",
|
||||||
"gpt-5-mini",
|
"gpt-5-mini",
|
||||||
"gpt-5-nano",
|
"gpt-5-nano",
|
||||||
// Anthropic models
|
// Anthropic models
|
||||||
"claude-opus-4.5",
|
"claude-opus-4.6",
|
||||||
"claude-sonnet-4.5",
|
"claude-sonnet-4.5",
|
||||||
"claude-haiku-4.5",
|
"claude-haiku-4.5",
|
||||||
// Qwen models
|
// Qwen models
|
||||||
"qwen3-turbo",
|
"qwen3-coder-plus",
|
||||||
"qwen3-plus",
|
|
||||||
"qwen3-max",
|
|
||||||
"qwen3-coder-480b-a35b-instruct",
|
|
||||||
// DeepSeek models
|
// DeepSeek models
|
||||||
"deepseek-chat",
|
"deepseek-chat",
|
||||||
"deepseek-reasoner",
|
"deepseek-reasoner",
|
||||||
// Other common models
|
// Other common models
|
||||||
"kimi-k2.5",
|
"kimi-k2.5",
|
||||||
"glm-4.7",
|
"glm-5",
|
||||||
"MiniMax-M2.1",
|
"MiniMax-M2.1",
|
||||||
] as const;
|
] as const;
|
||||||
|
|
||||||
@@ -60,15 +75,17 @@ function parseModelIds(input: string): string[] {
|
|||||||
|
|
||||||
function buildModelDefinition(modelId: string) {
|
function buildModelDefinition(modelId: string) {
|
||||||
const isAutoModel = modelId === "higress/auto";
|
const isAutoModel = modelId === "higress/auto";
|
||||||
|
const config = MODEL_CONFIG[modelId] || { contextWindow: DEFAULT_CONTEXT_WINDOW, maxTokens: DEFAULT_MAX_TOKENS };
|
||||||
|
|
||||||
return {
|
return {
|
||||||
id: modelId,
|
id: modelId,
|
||||||
name: isAutoModel ? "Higress Auto Router" : modelId,
|
name: isAutoModel ? "Higress Auto Router" : modelId,
|
||||||
api: "openai-completions",
|
api: "openai-completions",
|
||||||
reasoning: false,
|
reasoning: true,
|
||||||
input: ["text", "image"],
|
input: ["text", "image"],
|
||||||
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
|
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
|
||||||
contextWindow: DEFAULT_CONTEXT_WINDOW,
|
contextWindow: config.contextWindow,
|
||||||
maxTokens: DEFAULT_MAX_TOKENS,
|
maxTokens: config.maxTokens,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -261,17 +278,12 @@ const higressPlugin = {
|
|||||||
`Gateway endpoint: ${gatewayUrl}/v1/chat/completions`,
|
`Gateway endpoint: ${gatewayUrl}/v1/chat/completions`,
|
||||||
`Console: ${consoleUrl}`,
|
`Console: ${consoleUrl}`,
|
||||||
"",
|
"",
|
||||||
"🎯 Recommended Skills (install via Clawdbot conversation):",
|
"🎯 Recommended Skills (install via OpenClaw conversation):",
|
||||||
"",
|
"",
|
||||||
"1. Auto-Routing Skill:",
|
"1. Auto-Routing Skill:",
|
||||||
" Configure automatic model routing based on message content",
|
" Configure automatic model routing based on message content",
|
||||||
" https://github.com/alibaba/higress/tree/main/.claude/skills/higress-auto-router",
|
" https://github.com/alibaba/higress/tree/main/.claude/skills/higress-auto-router",
|
||||||
' Say: "Install higress-auto-router skill"',
|
' Say: "Install higress-auto-router skill"',
|
||||||
"",
|
|
||||||
"2. Agent Session Monitor Skill:",
|
|
||||||
" Track token usage and monitor conversation history",
|
|
||||||
" https://github.com/alibaba/higress/tree/main/.claude/skills/agent-session-monitor",
|
|
||||||
' Say: "Install agent-session-monitor skill"',
|
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
Reference in New Issue
Block a user