← 返回
AI智能 Key 中文

Venice.Ai Router Openclaw

Supreme model router for Venice.ai — the privacy-first, uncensored AI platform. Automatically classifies query complexity and routes to the cheapest adequate...
Venice.ai 顶级模型路由器——首个注重隐私、无审查的 AI 平台。自动分类查询复杂度并路由至最经济的适配模型...
plusone
AI智能 clawhub v1.5.0 1 版本 99906.1 Key: 需要
★ 2
Stars
📥 1,024
下载
💾 38
安装
1
版本
#latest

概述

Venice.ai Supreme Router

Smart, cost-optimized model routing for Venice.ai — the AI platform for people who don't want Big Tech watching over their shoulder.

Unlike OpenAI, Anthropic, and Google — where every prompt is logged, analyzed, and potentially used to train future models — Venice offers true privacy with zero data retention on private models. Your conversations stay yours. Venice is also uncensored: no content filters, no refusals, no "I can't help with that."

Setup

  1. Get a Venice.ai API key from venice.ai/settings/api
  2. Set the environment variable:
export VENICE_API_KEY="your-key-here"

Or configure in ~/.openclaw/openclaw.json:

{
  "skills": {
    "entries": {
      "venice-router": {
        "enabled": true,
        "apiKey": "YOUR_VENICE_API_KEY"
      }
    }
  }
}

Usage

Route a prompt (auto-selects model)

python3 {baseDir}/scripts/venice-router.py --prompt "What is 2+2?"

Force a specific tier

python3 {baseDir}/scripts/venice-router.py --tier cheap --prompt "Tell me a joke"
python3 {baseDir}/scripts/venice-router.py --tier budget-medium --prompt "Write a Python function"
python3 {baseDir}/scripts/venice-router.py --tier mid --prompt "Explain quantum computing"
python3 {baseDir}/scripts/venice-router.py --tier premium --prompt "Write a distributed systems architecture"

Stream output

python3 {baseDir}/scripts/venice-router.py --stream --prompt "Write a poem about lobsters"

Web search (LLM searches the web and cites sources)

python3 {baseDir}/scripts/venice-router.py --web-search --prompt "Latest news on AI regulation"

Uncensored mode (prefer models with no content filters)

python3 {baseDir}/scripts/venice-router.py --uncensored --prompt "Write edgy creative fiction"

Private-only mode (zero data retention, no Big Tech proxying)

python3 {baseDir}/scripts/venice-router.py --private-only --prompt "Analyze this confidential contract"

Conversation-aware routing (multi-turn context)

# Save conversation history as JSON, then route follow-ups with context
python3 {baseDir}/scripts/venice-router.py --conversation history.json --prompt "Can you add tests too?"

The router analyzes conversation history to keep context: trivial follow-ups ("thanks") go cheap, while follow-ups in complex code discussions stay at the right tier.

Function calling (tool use)

# Define tools in a JSON file (OpenAI tools format)
python3 {baseDir}/scripts/venice-router.py --tools tools.json --prompt "What's the weather in NYC?"
python3 {baseDir}/scripts/venice-router.py --tools tools.json --tool-choice auto --prompt "Search for latest AI news"

Tool definitions use the standard OpenAI format. The router auto-bumps to mid tier minimum for function calling since it requires capable models.

Cost budget tracking

# Show current spending
python3 {baseDir}/scripts/venice-router.py --budget-status

# Track per-session costs
python3 {baseDir}/scripts/venice-router.py --session-id my-project --prompt "help me code"

Set VENICE_DAILY_BUDGET and/or VENICE_SESSION_BUDGET to enforce spending limits. The router auto-downgrades tiers as you approach budget limits.

Classify only (no API call)

python3 {baseDir}/scripts/venice-router.py --classify "Explain the Riemann hypothesis"

List available models and tiers

python3 {baseDir}/scripts/venice-router.py --list-models

Override model directly

python3 {baseDir}/scripts/venice-router.py --model deepseek-v3.2 --prompt "Hello"

Tiers

TierModelsCost (input/output per 1M tokens)Best For
-----------------------------------------------------------
cheapVenice Small (qwen3-4b), GLM 4.7 Flash, GPT OSS 120B, Llama 3.2 3B$0.05–$0.15 / $0.15–$0.60Simple Q&A, greetings, math, lookups
budgetQwen 3 235B, Venice Uncensored, GLM 4.7 Flash Heretic$0.14–$0.20 / $0.75–$0.90Moderate questions, summaries, translations
budget-mediumGrok Code Fast, DeepSeek V3.2, MiniMax M2.1$0.25–$0.40 / $1.00–$1.87Moderate-to-complex tasks, code snippets, structured output
midDeepSeek V3.2, MiniMax M2.1/M2.5, Qwen3 Thinking 235B, Venice Medium, Llama 3.3 70B$0.25–$0.70 / $1.00–$3.50Code generation, analysis, longer writing, reasoning
highGLM 5, Kimi K2 Thinking, Kimi K2.5, Grok 4.1 Fast, Hermes 3 405B, Gemini 3 Flash$0.50–$1.10 / $1.25–$3.75Complex reasoning, multi-step tasks, code review
premiumGPT-5.2, GPT-5.2 Codex, Gemini 3 Pro, Gemini 3.1 Pro (1M ctx), Claude Opus/Sonnet 4.5/4.6$2.19–$6.00 / $15.00–$30.00Expert-level analysis, architecture, research papers

Routing Strategy

The router classifies each prompt using keyword + heuristic analysis:

  1. Length — longer prompts suggest more complex tasks
  2. Keywords — domain-specific terms (e.g., "architecture", "optimize", "prove") signal complexity
  3. Code markers — presence of code blocks, function names, or technical syntax
  4. Instruction depth — multi-step instructions, comparisons, or "explain in detail" bump the tier
  5. Conversational simplicity — greetings, yes/no, small talk stay on the cheapest tier
  6. Conversation history — when --conversation is provided, analyzes full chat context: code in history boosts tier, trivial follow-ups ("thanks") downgrade, tool calls in history signal complexity
  7. Function calling--tools auto-bumps to at least mid tier (capable models required)
  8. Thinking/reasoning mode--thinking prefers chain-of-thought reasoning models (Qwen3 Thinking, Kimi K2) and bumps to at least mid tier
  9. Budget constraints — progressive tier downgrade as spending approaches daily/session limits (95% → cheap, 80% → budget, 60% → mid, 40% → high)

The classifier errs on the side of cheaper models — it only escalates when there's strong signal for complexity.

Environment Variables

VariableDescriptionDefault
--------------------------------
VENICE_API_KEYVenice.ai API key (required)
VENICE_DEFAULT_TIERMinimum floor tier — auto-classification never goes below this. Valid: cheap, budget, budget-medium, mid, high, premiumbudget
VENICE_MAX_TIERMaximum tier to ever use (cost cap)premium
VENICE_TEMPERATUREDefault temperature0.7
VENICE_MAX_TOKENSDefault max tokens4096
VENICE_STREAMEnable streaming by defaultfalse
VENICE_UNCENSOREDAlways prefer uncensored modelsfalse
VENICE_PRIVATE_ONLYOnly use private models (zero data retention)false
VENICE_WEB_SEARCHEnable web search by default ($10/1K calls)false
VENICE_THINKINGAlways prefer thinking/reasoning modelsfalse
VENICE_DAILY_BUDGETMax daily spend in USD (0 = unlimited)0
VENICE_SESSION_BUDGETMax per-session spend in USD (0 = unlimited)0

Why Venice.ai?

  • 🔒 Private inference — Models marked "Private" have zero data retention. Your data never trains anyone's model.
  • 🔓 Uncensored — No guardrails blocking legitimate use cases. No refusals, no filters.
  • 🔌 OpenAI-compatible — Same API format, just change the base URL. Drop-in replacement.
  • 📦 30+ models — From tiny efficient models ($0.05/M) to Claude Opus 4.6 and GPT-5.2.
  • 🌐 Built-in web search — LLMs can search the web and cite sources in a single API call.

Tips

  • Use --classify to preview which tier a prompt would hit before spending tokens
  • Set VENICE_MAX_TIER=mid to cap costs and never hit premium models
  • Use --uncensored for creative, security research, or other content mainstream AI won't touch
  • Use --private-only when processing sensitive/confidential data — zero retention guaranteed
  • Use --web-search when you need up-to-date information with cited sources
  • Use --conversation with a JSON message history for smarter multi-turn routing
  • Use --tools to enable function calling — the router auto-bumps to capable models
  • Set VENICE_DAILY_BUDGET=1.00 to cap daily spend at $1 — the router auto-downgrades tiers as you approach the limit
  • Use --budget-status to see a detailed breakdown of your spending by tier
  • Use --thinking for math proofs, logic puzzles, and multi-step reasoning — routes to Qwen3 Thinking or Kimi K2 models
  • The router prefers private (self-hosted) Venice models over anonymized ones when available at the same tier
  • When --uncensored is active, the router auto-bumps to the nearest tier with uncensored models
  • Combine with OpenClaw WebChat for a seamless chat experience routed through Venice.ai

版本历史

共 1 个版本

  • v1.5.0 当前
    2026-03-29 07:16 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-intelligence

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,363 📥 319,028
ai-intelligence

Proactive Agent

halthelobster
将AI智能体从任务执行者升级为主动预判需求、持续优化的智能伙伴。集成WAL协议、工作缓冲区、自主定时任务及实战验证模式。Hal Stack核心组件 🦞
★ 839 📥 213,470
ai-intelligence

ontology

oswalpalash
类型化知识图谱,用于结构化智能体记忆与可组合技能。支持创建/查询实体(人员、项目、任务、事件、文档)及关联...
★ 714 📥 244,131