Skip to content

Add UncommonRoute provider for intelligent LLM cost routing#289

Open
Vivien202 wants to merge 1 commit into
andrewyng:mainfrom
Vivien202:feat/uncommonroute-provider
Open

Add UncommonRoute provider for intelligent LLM cost routing#289
Vivien202 wants to merge 1 commit into
andrewyng:mainfrom
Vivien202:feat/uncommonroute-provider

Conversation

@Vivien202

@Vivien202 Vivien202 commented Apr 21, 2026

Copy link
Copy Markdown

Summary

Adds UncommonrouteProvider — a provider adapter for UncommonRoute, an intelligent LLM cost router.

What it does for aisuite users

UncommonRoute runs as a local proxy that analyzes each request and routes it to the cheapest model capable of handling it. Users get cost savings without changing their code — just swap the provider prefix:

# Before: always uses GPT-4
response = client.chat.completions.create(model="openai:gpt-4o", ...)

# After: routes to cheapest capable model
response = client.chat.completions.create(model="uncommonroute:auto", ...)

Three routing modes: auto (balanced), fast (cheapest), best (strongest).

Implementation

  • Follows the existing HTTP-based provider pattern (similar to OllamaProvider)
  • Uses httpx (already a project dependency) — no new dependencies
  • Includes unit tests mirroring the existing provider test structure

Files

  • aisuite/providers/uncommonroute_provider.py — provider implementation (81 lines)
  • tests/providers/test_uncommonroute_provider.py — unit tests (67 lines)

UncommonRoute is a local proxy that analyzes each request and routes it
to the most cost-effective model. This provider adapter lets aisuite
users access its smart routing via model="uncommonroute:auto|fast|best".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant