npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

n8n-nodes-prenzllmgateway

v0.1.2

Published

Chat Model node for n8n — use a private LLM gateway as the LLM behind an AI Agent or LLM Chain (with tool calling).

Readme

n8n-nodes-prenzllmgateway

A custom n8n community node that exposes a private LLM gateway as a Chat Model. It plugs into the AI Agent (Tools Agent) and Basic LLM Chain Chat Model slot, just like the built-in OpenAI / Anthropic chat-model nodes — including function/tool calling.

It talks to a backend endpoint, POST /api/agent/messages, which:

  • takes a native OpenAI-style messages array (system / user / assistant / tool),
  • selects the assistant by persona id or name (which governs model + system prompt),
  • passes tools / tool_choice straight through and returns tool_calls — so the n8n Tools Agent works end-to-end.

Requirements

  • A gateway instance exposing /api/agent/messages and /api/agent/assistants.
  • An API key (sent as Authorization: Bearer <key> by default).
  • n8n with community nodes enabled. For use inside an AI Agent, also set N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true.

Credentials — "Prenz LLM Gateway API"

| Field | Default | Notes | |---|---|---| | Base URL | – (required) | Root URL of your gateway, no trailing slash | | API Key | – | API key for the gateway | | Auth Header Name | Authorization | Change if your gateway expects e.g. X-API-Key | | Add "Bearer " Prefix | true | Standard Bearer-token auth |

The credential Test button uses the Authorization header. The node's own requests honour a custom Auth Header Name if you set one.

Node properties

  • Persona (Assistant) — dropdown loaded live from /api/agent/assistants. Selects the assistant by id. Leave on Default LLM to use the instance default model with no persona.
  • Options → Timeout (ms) — request timeout (default 60000).
  • Options → Temperature — only applied when using the default LLM provider.
  • Options → Max Tokens-1 uses the provider default.

Build & publish

npm install --ignore-scripts
npm run build               # tsc + copies icon and codex metadata into dist/
npm pack --dry-run          # inspect the exact files that will be published
npm publish --access public # publish to npm

Then install in n8n via Settings → Community Nodes → Installn8n-nodes-prenzllmgateway, with N8N_COMMUNITY_PACKAGES_ENABLED=true and N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true.

Usage

  1. Add an AI Agent (or Basic LLM Chain) node.
  2. Click the Chat Model + → choose Prenz LLM Gateway Chat Model.
  3. Select/create the Prenz LLM Gateway API credential and pick a persona.
  4. (Optional) connect tools to the agent — the node forwards them and handles tool_calls.

Notes / limitations

  • Tool calling depends on the underlying LLM provider/model actually emitting tool calls.
  • No streaming in v1 (single JSON response). SSE can be added later via _streamResponseChunks.
  • Token usage is not reported (the backend endpoint does not return usage in v1).
  • @langchain/core is an optional peer dependency on purpose — n8n provides it, and a second copy would break LangChain's instanceof checks inside the Agent.