Creator Center
/Model/NVIDIA NeMo Switchyard
app icon

NVIDIA NeMo Switchyard

Verified by Dify
No ratings yet
0
L
langgenius/nvidia_nemo_switchyard

Route each LLM call between a capable and an efficient model with NVIDIA NeMo Switchyard.

NVIDIA NeMo Switchyard

Author: langgenius
Version: 0.0.1
Type: model

Description

Routes each LLM call between a capable model and an efficient model using
NVIDIA NeMo Switchyard. The routing library
() runs inside the plugin. No separate Switchyard service is needed.

The plugin uses Switchyard's stage router, the same algorithm as its preset. It reads the
tool results in the conversation:

  • No tool history, or weak signals: the efficient model answers.
  • A critical error (for example out of memory), the same error repeated, or a context-compaction
    marker: the capable model answers.
  • After an escalation, the capable model keeps the next 2 turns. A clean test pass ends this early.

The routing gives the most benefit to agent workloads with tool calls. Plain chat always goes to
the default tier.

Setup

Add a model under NVIDIA NeMo Switchyard in Dify. The model name is the route name shown in Dify, for
example . Each route has two upstreams. Each upstream is any endpoint that speaks one of
these APIs:

API formatEndpoint called
(default)
FieldMeaning
Capable / Efficient base URLBase URL ending in
Capable / Efficient API keySent as . Leave empty if not needed.
Capable / Efficient model nameModel ID sent to that upstream
Capable / Efficient API format (default) or . Use for servers without the Responses API.
Capable / Efficient reasoning summaryResponses API only. (default) or . Turn it on only for reasoning models that support summaries; other models can reject the request.
Capable / Efficient Max Tokens fieldChat Completions only. (default) or for reasoning models that reject . Used for both saving and invoking.
Default tier (recommended) or (experimental)
Confidence threshold0 to 1, default 0.5
Context sizeUse the smaller context window of the two models

Saving the route sends a short request to both upstreams. An error names the tier that failed.

Behavior

  • Fallback: if the selected upstream fails before it sends any output, the plugin tries the
    other tier.
  • Streaming: Dify's flag is passed to the upstream. A non-streaming call reads the
    whole upstream response before returning, so any upstream failure falls back. Saving a route
    always checks both upstreams with a streaming request.
  • Which model answered: the field of each result chunk is the upstream model that
    served it. Dify's run logs currently record the route name instead.
  • Sessions: Dify does not pass a conversation ID to model plugins. The plugin derives a
    session key from the end user and the first user message. The capable hold uses this key. Two
    conversations by one user that start with the same message share routing state.
  • State is per plugin process. Routing state lives in memory and is lost when the plugin
    restarts.
  • Reasoning: streamed reasoning is shown in tags. Chat Completions upstreams stream
    it when the model returns . Responses upstreams stream it only when the
    tier's reasoning summary is on. On Chat Completions upstreams, reasoning from earlier
    assistant tool-call turns is sent back as .
  • Reasoning in workflows: with the LLM node's default reasoning format, the
    `
    [ENDTHINKFLAG]
Thought(0.0s)
` block stays in the node's text output. Set the node to `separated` to get clean text plus a separate `reasoning_content` output.

Limitations

  • Text and tool calls only. Images, audio, video, and documents are rejected.
  • The Responses API has no parameter, so stop words are ignored for upstreams.
  • is pre-1.0. This plugin pins version 0.3.0.

Development

The end-to-end tests run the packaged plugin with the CLI and call real upstreams. They
are skipped unless are
set. See .

CATEGORY
Model
VERSION
0.0.1
langgenius·Updated 2 days ago
REQUIREMENTS
LLM invocation
Maximum memory
256MB
Access domain

No outbound calls found

Security
Security Rating

Last checked 10/21/2026 11:37 AM · version 0.0.1

Give a rate
SHARE WITH