Principle
Routerly must be a transparent drop-in replacement for any LLM provider. A user who today calls OpenAI, Anthropic, Ollama, etc. must be able to swap the base URL for Routerly's without changing a single line of code. Everything must work: current endpoints, future endpoints, future API versions.
This also means Routerly should never need to be updated just because a provider adds new APIs or changes endpoints — the proxy passes everything through, intercepting only what it needs.
Current problem
Routerly only handles paths it explicitly knows about (/v1/chat/completions, Anthropic messages). Any other path is not forwarded. This breaks the drop-in principle:
- A user who calls the Embeddings API must maintain two base URLs in their code (one for Routerly, one for the provider directly)
-
- When OpenAI/Anthropic/Ollama add new endpoints, Routerly must be updated to support them
-
-
- Same applies to any custom provider
Solution
Transparent default: any path not explicitly handled by Routerly is forwarded to the upstream provider, replacing only the API key. No config needed.
Routing depends on the provider configured in the project, not on the path. Examples:
# Project with OpenAI provider
POST /v1/chat/completions → routing engine → provider (handled by Routerly)
POST /v1/* → OpenAI /v1/* (pass-through)
# Project with Anthropic provider
POST /v1/messages → routing engine → provider (handled by Routerly)
POST /v1/* → Anthropic /v1/* (pass-through)
# Routerly internal management API — excluded from proxy
GET|POST /api/* → Routerly internal (unchanged)
Routerly intercepts only the paths it actively manages. Everything else is forwarded unchanged — today and for any future provider updates, without Routerly needing to be touched.
Scope
- All providers (OpenAI, Anthropic, Ollama, custom providers)
-
- Routerly's internal management APIs (
/api/*, dashboard) must not be affected by the pass-through mechanism
-
-
- No config required: transparent behavior is the default
Acceptance criteria
Principle
Routerly must be a transparent drop-in replacement for any LLM provider. A user who today calls OpenAI, Anthropic, Ollama, etc. must be able to swap the base URL for Routerly's without changing a single line of code. Everything must work: current endpoints, future endpoints, future API versions.
This also means Routerly should never need to be updated just because a provider adds new APIs or changes endpoints — the proxy passes everything through, intercepting only what it needs.
Current problem
Routerly only handles paths it explicitly knows about (
/v1/chat/completions, Anthropic messages). Any other path is not forwarded. This breaks the drop-in principle:Solution
Transparent default: any path not explicitly handled by Routerly is forwarded to the upstream provider, replacing only the API key. No config needed.
Routing depends on the provider configured in the project, not on the path. Examples:
Routerly intercepts only the paths it actively manages. Everything else is forwarded unchanged — today and for any future provider updates, without Routerly needing to be touched.
Scope
/api/*, dashboard) must not be affected by the pass-through mechanismAcceptance criteria
/api/*) are never proxied