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-aimedia-ai

v0.20.0

Published

Multi-provider AI Chat Model for n8n with sequential failover + retry. Any OpenAI-compatible provider (OpenAI, DeepSeek, NVIDIA, OpenRouter, Groq, ...), one credential per slot.

Downloads

1,637

Readme

n8n-nodes-aimedia-ai

AIMEDIA AI Chat Model — a multi-provider AI Chat Model for n8n with sequential failover + retry.

It plugs into an AI Agent like any Chat Model, but holds up to 3 provider slots. Providers are tried in order: if provider 1 errors OR returns an empty response → its retries → provider 2 → provider 3. The first non-empty response wins.

Works with any OpenAI-compatible endpoint — OpenAI, DeepSeek, NVIDIA NIM, OpenRouter, Groq, Together, Mistral, local LLMs, etc. Each slot has its own credential, so you can even use two different OpenAI accounts in slot 1 and slot 2.

This package ships two nodes:

  • AIMEDIA AI Chat Model — up to 3 provider slots with sequential failover.
  • AIMEDIA AI Chat Model (Single) — a single DeepSeek model (one deepSeekApi credential, no provider selector) with a built-in retry count + retry delay (seconds). Like the classic DeepSeek community node, but robust. The Base URL comes from the credential, so you can point it at api.deepseek.com or a DeepSeek-compatible proxy. Use this when you don't need failover, just a clean single model.

Why?

  • Reliability — automatic failover across providers/keys; an empty response is treated as a failure (not silently returned).
  • Robust — depends only on @langchain/core (a peer dep n8n always ships) + raw fetch to /chat/completions. It does not bundle @langchain/openai, so it doesn't break on n8n updates the way some community model nodes do.
  • Observable — the node's OUTPUT panel shows response.generations, tokenUsage, and an aimedia report (which slot answered, request count, retries, errors), and the node turns green — just like the official chat-model nodes.

Features

  • ✅ Sequential failover across 1–3 providers
  • Per-slot credential (independent) — e.g. 2 OpenAI keys + 1 DeepSeek
  • Live model dropdown — fetched from each credential's Base URL (/models), plus a free-text "By ID" mode
  • ✅ Per-slot retry count + delay
  • Empty response = failure → moves to the next provider
  • Thinking control — Enabled sends thinking:{type:'enabled'} + reasoning_effort:'high'|'max' so the model reasons in reasoning_content and makes proper tool calls (no "inner voice" leaking into the message); Disabled sends nothing (fastest)
  • Tool calling (AI Agent tools) supported
  • ✅ Automatic DeepSeek reasoning_content injection + tool-message sanitization (fixes the tool must follow tool_calls 400)

Install

Settings → Community Nodes → Installn8n-nodes-aimedia-ai

Usage

  1. Add AIMEDIA AI Chat Model to your AI Agent's Chat Model input.
  2. For each Credential at the top (Provider 1 / 2 / 3), set the API Key and Base URL (the Base URL decides the provider). Provider 1 is required; 2 and 3 are optional.
  3. Pick a Model for each active slot (list is fetched live from that credential's endpoint).
  4. Optionally set retries, delay, thinking, temperature, etc.

Slots 2 and 3 activate automatically once their credential and model are set.

Example

| Slot | Base URL | Model | |---|---|---| | Provider 1 | https://api.openai.com/v1 | gpt-4o-mini | | Provider 2 | https://api.openai.com/v1 (2nd account) | gpt-4o | | Provider 3 | https://api.deepseek.com/v1 | deepseek-chat |

License

MIT © AIMEDIA