OpenAI-compatible request shape
AIService builds the OpenAI chat-completions request. Point providerUrl at OpenAI, Anthropic, Together.xyz, Ollama, or Hugging Face Inference — no per-provider SDK in your code.
Features
Anouk deliberately stops at the AI runtime and configuration. Build tooling stays with your framework of choice; the model plumbing is ours.
One adapter, every OpenAI-compatible endpoint.
AIService builds the OpenAI chat-completions request. Point providerUrl at OpenAI, Anthropic, Together.xyz, Ollama, or Hugging Face Inference — no per-provider SDK in your code.
Provider URL, API key, model, and system prompt come from config that the user can change at runtime. Switch from OpenAI to a local Ollama endpoint without a rebuild.
Because the extension calls the provider directly, pointing at http://localhost:11434 (Ollama) keeps content on the user's machine end to end.
The plumbing that every AI extension re-invents.
Responses are cached by ${requestId}_${cacheKey}. Re-opening the same email or re-rendering the same sidebar returns the cached answer instead of repeating the spend.
Calls are queued per provider so a burst of user actions does not stampede the API or earn a 429 mid-render.
AIService.call(instruction, content, requestId, cacheKey?) is the single call. It reads config, checks cache, queues, dispatches, decodes, caches, and returns a plain string.
Give users a place to put their key.
A bundled panel where the user supplies providerUrl, apiKey, model, and systemPrompt. Values persist in chrome.storage.local. Ship one bundle; users choose what to run against.
Config can also come from code via aiConfig.js — a default export with the same fields — useful for hardcoded development setups.
The UI pieces are plain DOM, so they drop into a Plasmo, WXT, or hand-rolled extension without a framework dependency.
From zero to a loaded extension in one command.
anouk init <name> writes a Manifest V3 project with aiService.js, configManager.js, settingsPanel.js, and a starter entry point — pre-wired and runnable.
Drop an extension, service, or config template into an existing project with anouk generate extension|service|config.
The template bundles src/* to dist/ with esbuild. Load dist/ unpacked at chrome://extensions and iterate.
The quickstart takes you from install to a loaded extension that talks to a model.