Show HN: 我们构建了 OpenRouter,它能将使用数据转化为更强的模型
Show HN: We built open OpenRouter that turns usage into a better model

原始链接: https://github.com/experientiallabs/experiential

Experiential 是一个开源网关和路由器,旨在统一各种智能体工作流。它提供单一的 OpenAI 兼容 API,用于管理本地、托管以及自带密钥(BYOK)模型,并能对用户访问、使用情况和支出进行精细化控制。 主要功能包括: * **统一接口:** 通过一致的 API 支持 OpenAI、Anthropic、Gemini 等多种模型提供商。 * **灵活部署:** 可通过 `exp` 命令行工具运行本地网关,或使用托管的云平台。 * **优化路由:** 将生产流量转化为定制的路由器,以平衡质量、速度和成本。 * **遥测与微调:** 导入 OpenTelemetry 跟踪数据以分析性能,并使用内置的“Tinker”功能,根据优化后的路由逻辑对模型进行微调。 无论是在本地运行还是使用托管平台,Experiential 都是编码智能体(如 Cursor、Claude Code 或 Aider)的中心枢纽,允许用户在保持严格预算和身份治理的同时,无缝切换模型。该平台优先保障隐私,遥测数据仅限于非敏感的使用信息。

Experiential Labs 发布了一个开源、原生于 Rust 的 AI 模型网关。该项目旨在将自托管模型、前沿模型及开源模型整合至单一接口中。该网关支持超过 1,000 种模型,延迟低于 2 毫秒,并提供灵活的路由功能,通过利用使用流量来优化成本和性能。 与其他同类项目不同,该平台不对 Token 进行加价,并包含诸如通过 LLM 模拟判断自动选择模型,以及基于用户流量进行可选微调等“智能功能”。开发团队强调,其路由逻辑专注于特定任务的模型效率,而非频繁切换,这有助于缓解因缓存而导致的成本增加。 该项目可免费自托管,开发商通过企业许可和托管市场进行营运。尽管该发布凭借其性能和功能集引起了极大关注,但也引发了社区关于遥测透明度、AI 网关竞争格局(如 LiteLLM)以及 AI 时代下“开源”模式长期可持续性的讨论。开发商坚称,其商业模式依赖于增值的企业功能,而非 Token 加价。
相关文章

原文

gateway latency

Experiential is an open source gateway and router for agent workflows:

  1. Use hosted, BYOK, and local models through one OpenAI-compatible API.
  2. Control which users and agents can use which models, for which use cases, and how much they can spend.
  3. Turn production traffic into a custom router or model optimized for quality, speed, and cost.

Experiential workspace usage dashboard showing model traffic, identities, and spend

🌐 Platform | 📚 Docs | Discord

Start a local OpenAI-compatible gateway. On first run, the setup wizard uses the shared provider, model, and reasoning-effort selectors, persists every selected provider connection, then shows defaults for the public alias, identity, and $50.00 command budget before printing a one-time key:

pip install experiential
exp

Choose a public alias such as opus-5, capture the issued key, and send a request:

export EXP_GATEWAY_KEY=...
curl http://127.0.0.1:8000/v1/chat/completions \
  -H "Authorization: Bearer $EXP_GATEWAY_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"model":"opus-5","messages":[{"role":"user","content":"Help me"}]}'

Setup / get started with the hosted gateway

Prefer a managed gateway to running one locally? The hosted platform at platform.experientiallabs.ai serves the same OpenAI-compatible (and Anthropic Messages) API at https://api.experientiallabs.ai/v1. See SETUP.md for copy-paste prompts you hand to your coding agent (Claude Code, Cursor, Codex, and similar); the agent runs the setup for you. It collects four prompts:

  • Upload your LLM traces as telemetry: create an account instantly from your email, then pull or upload your existing LLM traces onto the platform as telemetry.
  • Connect your inference provider keys (BYOK): create an account, then connect your own OpenAI, Anthropic, Gemini, Azure, Bedrock, Fireworks, or OpenRouter keys for free pass-through.
  • Start calling models on the gateway: make your first /v1 call with the OpenAI and Anthropic SDKs using an xpl_ key, and optionally repoint your existing coding agents.
  • Full onboarding: create an account instantly from your email, connect your keys, import your spend, then repoint every coding agent (Claude Code, Cursor, Codex, Aider, and similar) or Conductor at the gateway.

Start the local gateway with exp (or exp run); the compiled native data plane serves every route on loopback. From Python, load a fitted project router as an official OpenAI client backed by its own private gateway:

import exp

with exp.load_router("my-project") as client:
    response = client.chat.completions.create(
        model="my-project",
        messages=[{"role": "user", "content": "hello"}],
    )

First, collect OpenTelemetry traces from your current agent. If you just want to try it out, grab the public terminal-tasks OTLP dataset:

curl -L -o traces.otel.jsonl \
  https://huggingface.co/datasets/experiential-labs/wmo-terminal-tasks-traces/resolve/540883e451dc13d34fb50fdd36b143cb0f1fb0db/traces.otel.jsonl

Then build a project. The build command walks you through providers, models, and budget, and asks for your trace file:

# Build simulation from your agent traces and optimize a router against it
exp build support-agent

After collecting traces from your router, fine-tune an open source model you own using Tinker.

exp optimize model support-agent

Anonymous aggregate PostHog product telemetry is enabled by default. It never includes prompts, traces, actions, observations, paths, model names, credentials, or raw customer content.

exp config telemetry status
exp config telemetry disable
exp config telemetry enable

The preference is stored locally in .exp/settings.toml.

uv sync --extra dev
uv run ruff format --check .
uv run ruff check .
uv run ty check
uv run pytest -q

Repository and documentation conventions live in AGENTS.md.

联系我们 contact @ memedata.com