Lean AI in LangBear LangBear, a fully bootstrapped application, has developed a lightweight, provider-agnostic AI interface to avoid the maintenance burden and dependency issues of heavier frameworks like LangChain.js. The custom interface, defined by a simple TypeScript type, allows the app to switch between AI providers such as OpenAI, Gemini, Anthropic, and OpenRouter in a single commit. This lean approach enables flexible migration to cheaper AI options without sacrificing functionality. LangBear https://langbear.com is fully bootstrapped. This means no investors' money to burn, no big budgets. All funding has been coming from my main job's income. This is why I made a decision early on to stay AI provider-agnostic as much as possible to have the flexibility to migrate to cheaper options. At first, I tried LangChain.js. It was too heavy and was burdensome to maintain. Too many dependencies. The API wasn't stable and oftentimes broke when I had to bump the version for security fixes. I decided to write a very lightweight interface that would satisfy all use cases of the app. I present it to you with all its glory as it is today: python import type z from "zod/v3"; export type AIProvider = { generateText