Back to Nodes

Minirouter Chat Model

Last updated Oct 9, 2026

n8n chat model and embeddings sub-nodes for minirouter.sh (OpenAI-compatible LLM router)

26 Weekly Downloads
193 Monthly Downloads

Included Nodes

Minirouter Chat Model
Embeddings Minirouter

Description

n8n-nodes-minirouter

n8n community nodes for minirouter.sh, an OpenAI-compatible LLM router. Plug the chat model into an AI Agent, Basic LLM Chain, or anything else that takes a model; plug the embeddings into a vector store.

Nodes

  • Minirouter Chat Model
  • – Live model dropdown from /v1/models (chat models only, minirouter/auto* routers listed first).
    – Options: fallback models, temperature, max tokens, top P, frequency/presence penalty, JSON mode, reasoning effort, timeout (default 2 minutes), retries.
    – Tool calling and streaming use n8n’s standard OpenAI-compatible path.
    – Each call’s output includes generationInfo.minirouter:
    { costUsd, balanceUsd, model, provider, ttftMs }. model is the model that actually answered, which is useful with minirouter/auto. The cost is also reported as tokenUsage.cost, so it counts toward n8n’s run totals.

  • Embeddings Minirouter
  • – openai/text-embedding-3-small, -3-large, -ada-002.
    – minirouter serves embeddings only in own-key mode: add your OpenAI key in the minirouter dashboard first.

  • Minirouter API credential
  • – API key (mr-live-...) and base URL (default https://api.minirouter.sh/v1). Saving it runs a test call to /credits.

    Requirements

    Self-hosted n8n 2.16 or newer. @n8n/ai-node-sdk, @langchain/openai and n8n-workflow are peer dependencies that n8n provides at runtime; don’t install them alongside this package or n8n ends up with two LangChain copies.

    Install

    From the n8n UI: Settings → Community Nodes → Install → n8n-nodes-minirouter. n8n skips peer dependencies automatically.

    Manually, in the custom folder inside your n8n user folder (usually ~/.n8n/custom):

    npm install --legacy-peer-deps n8n-nodes-minirouter
    

    Then restart n8n.

    Compatibility notes

  • n8n’s AI Agent sends tool-call turns with content: [], which minirouter rejects (“exceeds the bounds this billing snapshot can price”). The node rewrites those to "" before sending.
  • GPT-6 Sol/Luna need Reasoning Effort: None when the agent uses tools.
  • minirouter/auto:cheap can return 503 when none of its candidates can serve a request. Name a model directly or enable Retry On Fail.
  • An upstream provider occasionally hangs until minirouter’s 300s gateway timeout. The node’s 2-minute default timeout fails it sooner. Timeouts aren’t retried automatically, so turn on Retry On Fail in the agent or chain settings if the workflow should try again.
  • Fallback Models (up to 2) only kick in when the main model can’t start a response; once output starts, minirouter stays on that model. They can’t be combined with minirouter/* routers.

Development

npm install --ignore-scripts
npm run build
npm pack

License

MIT