Short answer: replace separate provider clients with one scoped classification API key and a strict JSON contract, keep chat completion model routing behind aliases, and require every route change to pass the same eval suite.
The deciding trade-off is control versus convenience. A Node.js application can submit the same label request every time while an internal gateway selects a chat completion model. The important part isn't the shared key. It is the eval suite and output schema that make a route change measurable and reversible.
This is a small architecture, on purpose.
If an application currently has separate OpenAI, Claude, and Gemini branches, replacing the SDK switch statements is only half the job. A useful migration also normalizes labels, refusal handling, retry ownership, observability, and the criteria for promoting a model. Otherwise, one API key merely hides three behaviors behind one URL.
How should a Node.js text classification API handle chat completions and model routing?






