feat: add TokenWise to LLM Router#428
Open
memurcie wants to merge 1 commit into
Open
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
License: MIT