Misceo

MaySudo活跃维护

本地部署的 Anthropic 兼容 AI 网关,按「先便宜后贵」路由模型,带质量门控、安全模型切换和内置成本看板,帮你在多模型调用中省钱又不掉质量。

Local Anthropic-compatible AI gateway with cheap-first routing, quality gates, safe model handoffs, and an embedded cost dashboard.

v0.1.2发布于 2026-08-03 04:54 UTC849star3fork同步于 2026-11-07 07:32 UTC

怎么上手

由 README 提炼,执行前请确认
npm install --global @misceo/cli
misceo init --mode balanced
misceo doctor
misceo start
硬件要求按 README 说明

README 未说明显存或 GPU 要求;需 Node.js 18 或更新版本及 npm,平台包覆盖 macOS arm64/x64、Linux glibc arm64/x64、Windows x64,无需单独安装 Bun、Docker 或 UI。

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

本地 Anthropic 兼容网关,先走便宜模型再按质量门禁升级,帮 AI 代理省钱又不中断会话

本地部署的 Anthropic 兼容 AI 网关,按「先便宜后贵」路由模型,带质量门控、安全模型切换和内置成本看板,帮你在多模型调用中省钱又不掉质量。

核心能力

  • 先尝试低成本后端,结构门禁通过后才返回候选答案
  • 可选 LLM 裁判按最新用户轮次打分,不合格则升级强模型
  • 会话身份分组与跨模型家族转录兼容处理
  • 工具循环进行中锁定后端,不中途换模型
  • 内嵌仪表盘展示实时流量、成本、延迟与路由原因

容易踩的坑

安装时不能用 --omit=optional,平台可执行文件以可选包形式分发;doctor 只做静态检查,不验证真实凭据或模型可用性;仪表盘无登录,默认端口 4141/5141 应只绑回环地址。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

2 个版本v0.1.2
  1. v0.1.2Misceo v0.1.2最新正式版2026-08-03 · 2026-08-03 04:54 UTC

    Prebuilt binaries and audited npm packages. Source code is not included. Verify assets with SHA256SUMS and release-manifest.json.

  2. v0.1.0Misceo 0.1.0 — public binary release2026-08-02 · 2026-08-02 16:21 UTC
    查看更新说明

    The first public prebuilt release of Misceo is distributed through npm. Install it with npm install --global @misceo/cli. It includes the local Anthropic-compatible gateway, embedded dashboard, three routing modes, session-aware model handoffs, tool-loop protection, history, and cost reporting. This GitHub repository contains public documentation and issue tracking; product source code is not included.


    Misceo 首个公开预编译版本通过 npm 分发。使用 npm install --global @misceo/cli 安装。该版本包含本地 Anthropic 兼容网关、内嵌管理界面、三种路由模式、具备会话意识的模型接管、工具调用闭环保护、历史与成本报告。本 GitHub 仓库用于公开文档和问题追踪,不包含产品源代码。

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    Misceo

    English · 简体中文

    npm version license platforms

    [!IMPORTANT] This is the official public documentation, issue tracker, and release home for Misceo. The product is distributed as prebuilt binaries through npm. Source code is not included in this repository.

    Cut AI-agent costs without breaking conversations or tool loops.

    Misceo is a local Anthropic-compatible gateway. It routes eligible requests through a lower-cost model, checks the completed candidate, and escalates to a stronger model when policy requires it.

    Unlike a request-only router, Misceo also protects agent state: session continuity, cross-model transcript compatibility, and ownership of active tool loops.

    Why Misceo

    Strong-only routing is simple but pays strong-model cost for every request. Cheap-only routing lowers spend but cannot recover when the answer is empty, malformed, or inadequate.

    A static router decides before generation. Misceo can also inspect the first completed candidate before choosing which answer the client receives.

    StrategyDecision pointTrade-off
    Strong-onlyBefore generationConsistent quality posture; strong-model cost on every request.
    Cheap-onlyBefore generationLowest routing overhead; no automatic recovery.
    Static routerBefore generationUses request metadata but cannot inspect the generated answer.
    MisceoBefore and after the first attemptAccepts a checked candidate or regenerates with a stronger model.

    Misceo does not make a cheaper model equivalent to a stronger model. It makes the cost-versus-quality policy explicit, observable, and configurable.

    How a request flows

    flowchart LR
        A["Anthropic-compatible client"] --> B["Misceo local gateway"]
        B --> C{"Protected route?"}
        C -->|"Yes"| S["Strong backend"]
        C -->|"No"| L["Lower-cost attempt"]
        L --> G{"Structural gate"}
        G -->|"Fail"| S
        G -->|"Pass"| J{"Judge policy"}
        J -->|"Accept or skip"| R["Return candidate"]
        J -->|"Reject or fail closed"| S
        S --> R2["Return regenerated answer"]
        B --> O["Local history and dashboard"]
    
    1. Protected routes, open tool loops, active pins, and explicit rules run before the cascade.
    2. Eligible traffic first reaches the configured lower-cost backend.
    3. A structural gate rejects upstream failures, empty output, and malformed tool calls.
    4. Depending on the selected mode, an optional judge scores the visible candidate against the latest user turn.
    5. A passing candidate is returned. A rejected candidate is discarded and a stronger backend generates the served answer.
    6. Escalated conversations remain on the stronger backend for a configurable number of fresh turns.

    See Routing and handoffs for decision precedence, session identity, tool-loop protection, and mode-specific failure behavior.

    Agent-safe routing

    Conversation continuity

    Misceo groups requests by structured session identity when the client provides it. Bootstrap, title-generation, and visible requests from one launch remain part of the same conversation.

    Cross-model handoff

    Provider-specific thinking signatures, cache markers, model names, and message invariants are handled at model-family boundaries. The original local audit record remains available for inspection.

    Tool-loop ownership

    When a model opens a tool loop, that backend keeps ownership until the loop is complete. Misceo does not move an active tool_use / tool_result exchange to another model family halfway through.

    First-visible-reply protection

    For eligible structured sessions, known launch bootstrap traffic is separated from the user's first visible request. The first visible reply uses the strong backend before later requests enter normal routing.

    Where data goes

    The proxy, embedded dashboard, configuration, and traffic logs run locally. Local does not mean offline: inference requests go to the providers selected by your routing policy.

    For an eligible cascade, the first provider receives the request. If the candidate is rejected, the escalation provider also receives the request. A configured judge receives the capped latest user turn, visible candidate, and tool names.

    Read Privacy and data before using Misceo with sensitive prompts or exposing either listener beyond loopback.

    Highlights

    • One Anthropic-compatible endpoint for Claude, GLM, and custom backends.
    • Three explicit postures: quality-first, balanced, and savings-first.
    • Structural validation plus an optional LLM judge.
    • Session-aware model-family handoffs and tool-loop protection.
    • Embedded dashboard with live traffic, history, cost, and deletion controls.
    • Observable serving backend, judge result, latency, usage, and route reason.
    • Manual backend handoff from the CLI or dashboard.

    Requirements

    • Node.js 18 or newer and npm for installation and the npm launcher.
    • Provider credentials for the backends you enable.
    • No separate Bun, Docker, or UI installation.

    Published platform packages currently cover:

    Operating systemArchitectures
    macOSarm64, x64
    Linuxglibc arm64, glibc x64
    Windowsx64

    See Compatibility for client and platform boundaries.

    Start in five minutes

    Install the CLI:

    npm install --global @misceo/cli
    

    Do not install with --omit=optional; the platform executable is delivered as an optional package.

    Create a private configuration:

    mkdir my-misceo
    cd my-misceo
    misceo init --mode balanced
    

    Add the provider credentials you use to .env:

    ANTHROPIC_API_KEY=your-anthropic-key
    ZAI_API_KEY=your-zai-key
    

    Validate and start:

    misceo doctor
    misceo start
    

    doctor performs static checks. It does not contact providers, validate live credentials, or prove model availability.

    Connect Claude Code on macOS or Linux:

    ANTHROPIC_BASE_URL=http://127.0.0.1:4141 \
    ANTHROPIC_AUTH_TOKEN=misceo \
    claude
    

    For Windows PowerShell and a complete verification procedure, read Getting started.

    Default local addresses:

    • Proxy: http://127.0.0.1:4141
    • Dashboard: http://127.0.0.1:5141

    Verify routing in 60 seconds

    Send a normal prompt in Claude Code, followed by a second small request. In an eligible structured session, the first visible response is protected and a later request can exercise the cascade.

    Open the dashboard and inspect Live traffic. Confirm the serving backend, route or cascade note, status, latency, and judge score when a judge ran.

    In another terminal:

    curl http://127.0.0.1:4141/healthz
    misceo status
    

    A healthy response, a traffic row, and a visible session confirm that the client is using Misceo instead of contacting a provider directly.

    Routing modes

    ModeJudge behaviorIf the judge is unavailable
    quality-firstRequiredEscalate to the strong backend.
    balancedUsed when configuredServe a structurally valid lower-cost candidate. This is the default.
    savings-firstSkippedContinue from the structural gate without a judge call.

    Select a mode during initialization:

    misceo init --mode quality-first
    misceo init --mode balanced
    misceo init --mode savings-first
    

    Dashboard

    The management UI is embedded in the installed executable. It includes:

    • live routing state, sessions, handoffs, and pins;
    • traffic detail with request, response, judge, status, and latency;
    • token and cost fields with contextual explanations;
    • searchable, paginated conversation history;
    • deletion for one conversation or all recorded history.

    The dashboard has no user login. Keep it on loopback unless trusted authentication and network controls are placed in front of it.

    Read Dashboard for listener options and data controls.

    Evidence and limitations

    Misceo does not publish a universal savings or quality percentage. Results vary with tasks, models, providers, prices, region, and sampling behavior.

    The public benchmark contract compares four policies on the same versioned task set:

    1. strong-only
    2. cheap-only
    3. cheap-first + structural gate
    4. cheap-first + judge

    Reports must include task success, quality loss, cost, latency, escalation rate, judge error rates, and handoff retention. No public result is included until the corresponding task set and raw report can be published together.

    See Benchmark methodology.

    CLI quick reference

    CommandPurpose
    misceo initCreate a private starter .env.
    misceo doctorPerform static configuration checks.
    misceo startStart the proxy and embedded dashboard.
    misceo statusShow current routing and session state.
    misceo handoff BACKENDSwitch the active backend.
    misceo costReport token cost and configured savings.
    misceo auditRun explicit paid compatibility probes.
    misceo logsPrune, reindex, or forget local history.

    Detailed flags and configuration examples are in Getting started and Configuration.

    Documentation

    GuidePurpose
    Getting startedInstall, configure, connect, verify, update, and uninstall.
    Routing and handoffsCascade decisions, sessions, judges, and tool loops.
    ConfigurationEnvironment variables, endpoints, pricing, and listeners.
    CompatibilitySupported platforms, clients, and protocol boundaries.
    DashboardUI behavior, history, cost fields, and exposure safety.
    Privacy and dataProvider flow, local logs, retention, and deletion.
    TroubleshootingCommon installation, endpoint, port, and history problems.
    Benchmark methodologyReproducibility rules, metrics, and claim boundaries.

    Source availability, license, and support

    This repository does not contain Misceo source code. Published binaries are licensed under the Functional Source License 1.1 with the Apache 2.0 Future License. Review the license before redistribution or competing use.

    Use GitHub Issues for reproducible bugs and documentation problems. Read SUPPORT.md before filing.

    Report security vulnerabilities privately as described in SECURITY.md.