AI · Engineering
One prompt, three models
I did not want a demo that only works when one vendor is up and in the mood.
The AI Answer Engine sends the same prompt to OpenAI, Gemini, and SarvamAI at once. Each call can fail. Each answer can be thin. A later aggregation step writes one response from what came back.
It lives as a pnpm monorepo: core, CLI, logging. That split is the point. The model call is a library. The CLI is a user. Logs are not an afterthought dumped in console.log.
Retries are product behavior
Providers flake. Timeouts happen. A retry with a budget is the difference between “AI feature” and “this form is dead.” The engine retries the provider that failed, not the whole fan-out, so one slow vendor does not stall the others.
Aggregation is a trust decision
The last model sees other outputs. That is useful and dangerous. Useful: it can drop a hallucinated name that only one provider invented. Dangerous: it can launder a bad claim if you treat the merge as ground truth.
I treat the merge as a synthesis, not a verdict. The user still gets one answer. I do not pretend the answer is audited research.
AI as an integration problem
This is application engineering: keys, retries, concurrency, logs. The model is a dependency. The product still has to ship when one vendor is slow.