Own products & experimentsOwner

AI and LLM experiments

TL;DR

One chat UI over several OpenAI-compatible gateways, Whisper and Qwen tests through Bytez, and a React sandbox used to rebuild and debug an admin page.

Technologies
5
Diagrams
1
Reading time
2 min

PythonFastAPI / FlaskLLM integrationReactTypeScript

Inventory

# Item Path Dates Git Size Classification
A Multi-provider LLM chat (Flask) internal path 2025-11 no app.py 181 + 2 test scripts + 2 templates + JS / CSS B: small real app
B Bytez SDK tests (Node / TS) internal path 2025-11-17 no 6 TS files, 686 lines total C: SDK evaluation
C ai-test-1 internal path 2025-11-17 no empty EMPTY, omitted
D Gemini CLI sandbox internal path 2025-09-25 no empty EMPTY, omitted

A. Multi-provider LLM chat (Flask)

What it does: one small web UI that talks to several hosted-LLM gateways behind the same chat page, so models can be compared side by side.

Layer Detail
Back end Flask app.py. Routes: / (provider picker, home.html), /chat/<provider> (chat page, index.html) with provider ∈ {agentrouter, bytez, openrouter}, POST /api/chat (JSON in / JSON out)
Providers OpenRouter and AgentRouter via requests.post(<base>/chat/completions) (OpenAI-compatible schema); Bytez via the bytez Python SDK (handle_bytez)
Front end static/script.js (fetch to /api/chat, renders the message list), static/style.css
Tools check_openrouter_models.py (lists available / free OpenRouter models), test_bytez.py (SDK smoke test)
Packages flask (web), requests (HTTP to OpenAI-compatible APIs), python-dotenv (keys from .env), bytez (Bytez SDK), pypdf (PDF text extraction for document chat)
A. Multi-provider LLM chat (Flask)
Diagram as text
flowchart LR
 U[Browser chat page] -->|POST /api/chat {provider, model, messages}| F[Flask app.py]
 F -->|openrouter / agentrouter| OR[(OpenAI-compatible /chat/completions)]
 F -->|bytez| BZ[(Bytez SDK model.run)]
 OR --> F
 BZ --> F
 F -->|reply JSON| U

Pattern: a provider-adapter switch (one handler per provider, same response shape back to the UI). This is the same idea as an LLM gateway / router.

B. Bytez SDK tests (TypeScript)

Packages: bytez.js ^1.1.18 (Bytez model-hosting SDK), dotenv ^17 (keys).

File Purpose
index.ts basic text-model call
chat-cli.ts terminal chat loop; history kept in chat_history.json
qwen.ts Qwen model test
run-local.ts / run-path.ts / run-stream.ts speech-to-text with openai/whisper-large-v3, tested three ways: local file, file path, and fs.createReadStream stream input; output saved to transcription.txt

This was an evaluation of Bytez as a cheap host for open models (LLM chat plus Whisper transcription). It fed directly into item A’s Bytez handler.

E. React + shadcn test app

Vite + React 18 + TypeScript + Tailwind + shadcn/Radix (collapsible, dialog, slot), lucide-react, sonner, react-router-dom 6, CVA / clsx / tailwind-merge. prompt.txt shows the purpose: a clean sandbox to rebuild the RedWings admin “ApplicationDetailPage” (P10, 014) after a Babel parse error (Unexpected token (700:11)) in the real repo. Commits on 2025-11-27: “initial commit”, “logo loading”. Classification C: a debugging copy of RedWings UI, not a separate project; it is listed under P10’s duplicate set.

Related projects

Want to discuss this project?

Happy to walk through the architecture, trade-offs or the code.

Email me about it

© 2026 Thuyavan Sivarasa. Script code is MIT licensed.