rhyizm/unified-llm — reverse-engineered prompt
Reverse engineered prompt
Build me a small TypeScript library that gives me one simple way to talk to different AI providers without rewriting my app every time I switch models. I want to be able to use OpenAI, Anthropic, Google Gemini, DeepSeek, Azure OpenAI, and Ollama through the same client, just by changing the provider and model settings.
It should support normal chat, streaming responses with a clean event flow of start, text_delta, stop, and error, and give me one easy text field I can read no matter which provider I use. I also want local function calling, so I can register tools like reading files or checking weather, and have the model use them during chat or streaming without me dealing with provider specific tool call mess.
Please include structured JSON output support, basic SQLite conversation history with threads, and access to the original provider response when needed. Make it feel clean and easy for developers to use, with examples and tests. Look up current provider docs online if you need to.
Want more depth? Deep Reverse