TanStack AI’s support-ticket example asks one set of questions regardless of which decision model the user picks. The server can send those same questions to TypeSafe’s hosted Jev or to Laya running locally through Ollaya.
Keep the questions fixed when switching models
- Define the answers in application code.
choice()gives the queue as a TypeScript union such asbilling,techorsales.score()returns the nearest urgency label and a raw score.boolean()returns a refund-request flag and the probability of yes. - Swap the server adapter. The example keeps the ticket and question map unchanged across providers. The TypeSafe adapter sends them directly to
/v1/systemonewith the server’s API key. See the Ollaya notes for what changes when you serve the model yourself. - Keep more than the final label when comparing providers. The short guide returns only
.valueto the browser. A comparison should also record the model and the probabilities, then check both models against the same labeled tickets.
Caveat: The example and adapter were inspected, not run. A shared TypeScript return type tells you which values the app can receive. It does not tell you which model routes tickets correctly.