跳到正文
原文
OpenRouter:Blog(Announcements)·· 2026-07-24AI 评分54

OpenRouter 推出 Classifiers,用结构化标签追踪 Agent 用途与成本

Classifiers: Track What Your Agents Do and What It Costs

文章要点
  • 1OpenRouter 推出 Classifiers beta,自动为每次模型请求打上结构化元数据标签
  • 2内置部门、受众、任务类型等 6 个预设模板,结果写入日志并可在 Activity 中按维度聚合支出
  • 3分类器由分类体系、分类提示词、分类模型和采样率四部分组成,分类体系最多支持 8 个维度
  • 4官方推荐 Gemini 3.5 Flash Lite 做分类模型,高流量下可用采样率控制分类成本
决策要点

OpenRouter 把模型请求的用途、复杂度和归属变成可配置的结构化标签,AI 用量从一笔混合账单变成可归类的经营数据。

  • 影响:多模型团队的推理支出可拆解到部门和任务层级,成本核算有了依据;资本化与合规模板把 AI 用量对上财务和监管口径;分类异步运行,不增加推理延迟。
  • 参考:可考虑先用部门或任务类型模板小范围试点,算出分类成本占推理支出的比例;值得盘点现有 AI 用量报表缺少哪些维度,再决定自建分类体系。
  • 依据:功能细节来自 OpenRouter 官方博客公告,产品处于 beta 阶段,模型推荐与模板能力均为官方口径,暂无独立验证。
正文

You can now automatically classify your OpenRouter generations with structured metadata for AI usage reporting.

Every request carries information: the type of work, the level of complexity, which department it came from, whether it contains internal data it shouldn’t. Classifiers, now available in beta, give you that visibility. Define your criteria (task type, agent complexity, compliance category, cost center). A model of your choice tags each generation, or a sampled subset, against your taxonomy and write the results to your logs. You get continuous visibility into what your agents and users are doing, which models they’re using for different tasks, and where the costs go.

Create a classifier in your workspace settings, or read the docs first.

Pick a template or define your own taxonomy

A classifier is a small config with four parts: a taxonomy (up to eight dimensions, each with the values you choose), a classification prompt (instructions sent to the classifier model as a system message), a model to read each prompt and apply it, and a sampling rate. Classification runs asynchronously after each request completes, so it never adds latency to your inference path.

Choose from six preset templates, customize a template, or build your own from scratch.

TemplateWhat it tags
DepartmentWhich business function originated the request: engineering, sales, marketing, legal, and so on. Useful for seeing which parts of the org drive inference cost
AudienceWho the output is for: internal use, client-facing, regulators, or the public. Feeds compliance workflows that depend on who reads a model’s output
Task typeWhat the model is doing: coding, agent workflows, data processing, content writing. Useful to check whether the right tier of model is being used for each task
Engineering workFeature development, bug fixing, documentation, refactoring, code review. Good for tracking where AI is helping and which models are used for each type of work
Agent complexityDifficulty tier (from trivial tool calls to frontier-expert work) plus task family. For teams running agents, where “which model handled a hard task well” is the question that matters
Capitalizable software expenseWhether AI-assisted engineering work is potentially capitalizable development versus maintenance, operations, or support

Select your classification model. We recommend Gemini 3.5 Flash Lite for the best value: cheap, strong accuracy on structured output, good enough for most taxonomies. You can change the model at any time.

At high throughput, the cost of classifying every request adds up. Use the sampling rate to keep costs down. Run a high-fidelity compliance classifier at 100% while a broader cost-attribution classifier samples 10% of the same traffic, keeping costs proportional to the oversight you need.

Classifier outputs are coerced into structured formats, constrained to the dimensions and values you define. Every classified generation is tagged in your logs, so you can filter requests by classification. For example, you can pull every request tagged department: legal or agent_complexity_difficulty_tier: complex_multistep. Each tagged generation’s detail panel breaks down classified dimensions and values.

You can also run a classifier on demand against any past generation to sanity-check a new taxonomy. Open it in your logs, pick a classifier, and see how it gets tagged.

Logs filtered by a classifier value, with a generation's detail panel showing its classified dimensions: difficulty tier, task family, and more

Roll it up in Activity

Individual tags on generations answer “what was this request?” The Activity Explorer answers the aggregate questions: group your traffic by any classifier dimension to see which models are being used for each task type or level of agent complexity, and which departments or tasks drive the most spend.

Results are aggregated over time; watch patterns shift in your data and show stakeholders how your AI usage is governed. Classifier filters carry across the Activity tabs so you can see trends and guardrail enforcement by any classifier value.

Activity Explore grouping total usage by the agent complexity classifier's difficulty tier, showing spend per tier from complex_multistep to frontier_expert

Get started

Classifiers are available now in beta. Create a classifier in your workspace or read the docs to learn more about taxonomy design, billing, and how classification works under the hood. Classifiers work even with input & output logging disabled.

Tell us what you think in #feedback on Discord.

来源:OpenRouter:Blog(Announcements) · openrouter.ai