doks ships with two adapters: one for embeddings (lib/embed.ts) and one for chat completions. Both are small async functions. Swap providers without touching the pattern.
The reference uses voyage-3-lite at 512d. Free tier is plenty for most docs sites. Deterministic hash fallback for offline runs.
Reference chat model. Streaming is clean and tool-use translates well to documentation Q&A.
Adapter targets z.ai's OpenAI-compatible endpoint. Drop in your key and the GLM-4.5 family is wired into the chat panel.
deepseek-chat for fast Q&A, deepseek-reasoner for chain-of-thought answers. OpenAI-compatible API; same URL-and-key swap.
text-embedding-3-small for embeddings or chat completion. Same shape; swap the URL and auth.
Strong free-tier limits make Gemini a good fit for OSS docs and side projects. Adapter handles the message-format quirks.
Fast and inexpensive. Mixtral handles long-form documentation answers; Mistral Small for quick Q&A.
The whole integration surface is a single async function: takes a system prompt, a question, and history; yields tokens.
// One adapter, swap providers by changing the URL + auth. async function callModel({ system, question, hist }) { const res = await fetch(PROVIDER_URL, { method: "POST", headers: { "authorization": `Bearer ${KEY}` }, body: JSON.stringify({ model: MODEL, stream: true, messages: [{ role: "system", content: system }, ...hist, { role: "user", content: question }] }) }); return parseSSE(res.body); }
doks is a public pattern, released under MIT. There is no company behind it, no email list to join, and nothing to install beyond a Next.js project. Take it and make your docs answer questions.