NNYK / BLUEPRINTSAI SYSTEMS EXPLAINED
SYSTEM BLUEPRINT / 03 · HOSTED FASTAPI / NO-PROVIDER DEMO

RouteWise.

A traffic director for requests to language models. RouteWise is a hosted FastAPI gateway that chooses a fast or reasoning route using simple rules, optionally calls a configured model provider, and tries an alternate provider for eligible retryable failures.

Railway backend · Live route classificationFastAPI · HTTPX · Routing · Retry logic18 automated tests
01 / START HERE

What is it, really?

Applications may want predictable routing behavior and a bounded fallback instead of tying every request to one upstream provider. RouteWise demonstrates that gateway logic transparently.

IN EVERYDAY LANGUAGE

Imagine a receptionist directing ordinary questions to the quick-service desk and harder questions to the specialist. If the chosen desk is temporarily unavailable, a second desk may be tried. That is the routing pattern—without claiming the rules always pick the best model.

WHO IT HELPS

The practical use case

Applications may want predictable routing behavior and a bounded fallback instead of tying every request to one upstream provider. RouteWise demonstrates that gateway logic transparently.

WHAT YOU CAN VERIFY

Hosted demo API

Public source code, architecture documentation, tests and the labeled browser demo are linked below. The implementation boundaries are documented, not hidden.

02 / INTERACTIVE BLUEPRINT

Follow the architecture.

Select any stage below. The explanation shows what enters that part of the system, what it does and what comes out. This diagram explains real code architecture; it is not connected to the running backend.

IN FOCUS / Step 1 of 5

Authenticate

A client sends a bounded chat request with a server-issued gateway bearer token. The API validates message roles, lengths, token count and rejects streaming, which this version doesn't implement.

WHAT GOES INAuthenticated non-streaming chat request
WHAT COMES OUTValidated request or an explicit error
Tip: use ← → arrow keys while a stage is focused.

The visual flow is an educational representation. For the exact code paths, open the source and engineering documentation.

03 / WALK THROUGH A QUESTION

What does it look like?

These simplified examples are drawn from the repository's documented behavior. They explain what to expect; they do not execute an API request from this page.

EXAMPLE INPUT

What you provide

POST /v1/chat/completions
Authorization: Bearer <server-issued gateway key>
{
  "model": "auto",
  "messages": [
    {"role": "user", "content": "Analyze these architecture tradeoffs"}
  ]
}
EXAMPLE OUTCOME

What the system determines

Selected route: reasoning
Reason: keyword "analyze"

Current hosted demo response:
"Demo response from reasoning; no language model was called."

With real configured providers, eligible 429, 5xx, network or timeout errors can trigger one alternate attempt.

This is an explanatory walkthrough of the implementation, not a live API call made by this page. The publicly hosted service is in no-provider mode. Never paste upstream provider keys into a browser.

04 / WHY THE TECH EXISTS

Every component has a job.

Instead of a giant list of tools, these are the actual responsibilities each technology has in this project.

FastAPI

Hosts chat-shaped and metrics endpoints with request validation.

HTTPX

Makes configured HTTPS upstream requests and handles timeouts.

Heuristic classifier

Uses message length and selected keywords to choose a tier.

Server environment

Holds provider URLs, model identifiers and credentials outside the browser.

05 / OPEN THE EVIDENCE

Show the working parts.

✓ Implemented

  • Fast/reasoning selection uses explicit deterministic rules and optional overrides.
  • Bearer authentication protects chat and metrics endpoints.
  • Configured HTTPS providers can be called with at most two sequential attempts.
  • Retry is limited to eligible transient errors.
  • Unconfigured mode clearly labels fixture responses as demos.

○ Not claimed

  • No actual LLM is connected to the public Railway deployment.
  • The classifier is keyword/length based, not semantic or learned routing.
  • No streaming, tool calling, caching or circuit breaker.
  • Stored metrics are memory-only, limited to successes and reset on restart.
  • No proven quality, latency or cost improvement compared with a baseline.
06 / QUESTIONS THAT MATTER

Understand the trade-offs.

COMMON QUESTION

Does the public API call GPT or Claude?

No. In its current configuration it returns a response explicitly saying no language model was called.

COMMON QUESTION

How does it decide between fast and reasoning?

It uses deterministic rules: text length, listed keywords or the client's explicit override.

COMMON QUESTION

Will it always retry failures?

No. It only retries eligible transient errors and requires a configured alternate provider.

Being clear about limitations is part of engineering: the project shows patterns and testable code, not a promise of production security, measured cost reduction or unconfigured model inference.

07 / KEY WORDS

No jargon left behind.

Gateway
A service that receives a request and forwards it according to rules.
Heuristic
A transparent rule of thumb rather than a trained model.
Fallback
Trying an alternate provider after certain transient failures.
Latency
Elapsed time taken to process a request.