Skip to content

feat: add TokenWise to LLM Router#428

Open
memurcie wants to merge 1 commit into
InftyAI:mainfrom
memurcie:add-tokenwise
Open

feat: add TokenWise to LLM Router#428
memurcie wants to merge 1 commit into
InftyAI:mainfrom
memurcie:add-tokenwise

Conversation

@memurcie
Copy link
Copy Markdown

Summary

Adds TokenWise under `### LLM Router`, placed alphabetically between `RouteLLM` and `vLLM Semantic Router`.

What it is

TokenWise is an Anthropic-only model router that runs as a Claude Code skill. Unlike multi-vendor gateways (LiteLLM, Portkey, AI Gateway), it focuses narrowly on routing Claude Code subtasks across Haiku, Sonnet, and Opus based on task class — and measures every routed task to a local NDJSON with verified $ saved vs an all-Opus baseline.

Includes an A/B test mode (`/tokenwise:ab ""`) that runs the same task at multiple tiers and scores outputs, so routing decisions can be validated on the user's real workload instead of trusting heuristics.

Why it belongs here

The existing `### LLM Router` entries span multi-vendor gateways (LiteLLM, Portkey, Bifrost) and routing frameworks (RouteLLM, LLMRouter, vLLM Semantic Router). TokenWise adds the measurement-driven, single-vendor angle — purpose-built for cost optimization on Claude Code workflows where users currently default to Opus for all tasks (Anthropic Issue #27665 reports 93.8% of Max-subscriber tokens flow to Opus).

Happy to relocate to a different section if the maintainer prefers.

Honest scope

  • Anthropic-only by design (use LiteLLM or OpenRouter for cross-vendor)
  • Routes inside Claude Code only, not a standalone proxy
  • Token counts approximate to ±2% vs Anthropic billing

License: MIT

TokenWise — measurement-driven model router for Claude Code (Anthropic-
only by design). Routes Haiku/Sonnet/Opus per task class, logs every
routed task with verified $ saved, A/B tests cheaper tiers before
trusting them. Includes shields.io badges to match the section format.

Narrower scope than LiteLLM/RouteLLM (single-vendor) but adds the
measurement-driven angle missing from existing entries.

Repo: https://github.com/CodeShuX/tokenwise
License: MIT
@InftyAI-Agent InftyAI-Agent added needs-triage Indicates an issue or PR lacks a label and requires one. needs-priority Indicates a PR lacks a label and requires one. do-not-merge/needs-kind Indicates a PR lacks a label and requires one. labels May 11, 2026
@InftyAI-Agent InftyAI-Agent requested review from cr7258 and samzong May 11, 2026 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/needs-kind Indicates a PR lacks a label and requires one. needs-priority Indicates a PR lacks a label and requires one. needs-triage Indicates an issue or PR lacks a label and requires one.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants