feat(workflows): make the chat and code-assistant templates real - #2496
Open
Hoang130203 wants to merge 1 commit into
Open
feat(workflows): make the chat and code-assistant templates real#2496Hoang130203 wants to merge 1 commit into
Hoang130203 wants to merge 1 commit into
Conversation
config/n8n/01-chat-endpoint.json and 07-code-assistant.json were
placeholders: a manualTrigger, a sticky note reading "Customize the nodes
below to match your setup", and "connections": {}. Importing either gave
you an empty canvas, while the dashboard advertised them as "Chat API
Endpoint — REST API for chat completions, setupTime: 1 minute".
Both are now working workflows:
chat-endpoint Webhook POST /webhook/ods-chat -> validate body ->
llama-server /v1/chat/completions -> JSON reply.
Optional system / temperature / max_tokens overrides.
code-assistant Webhook POST /webhook/ods-code -> require task + code ->
llama-server with a code-review system prompt at
temperature 0.2 -> JSON answer.
Both reach llama-server at its in-network address (llama-server:8080,
the manifest's `port`, not the published external port) so the traffic
never leaves the Docker network. Both answer 400 with a useful message
when the body is missing required fields, instead of failing inside the
HTTP node.
The sticky note in each is now a working curl example rather than a
placeholder.
This was referenced Aug 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ods/CONTRIBUTING.mdasks for "Workflow templates — pre-built n8n workflowsthat solve actual problems people have." The two llama-server-only entries in
the catalog were not that. Both were:
{ "nodes": [ { "type": "n8n-nodes-base.manualTrigger", "parameters": {} }, { "type": "n8n-nodes-base.stickyNote", "parameters": { "content": "## Chat API Endpoint\n\nThis is a template workflow for REST API chat completions.\n\nCustomize the nodes below to match your setup." } } ], "connections": {} }An empty canvas and a note telling you to build it yourself — while the
dashboard advertises "Chat API Endpoint — REST API for chat completions" with
"setupTime": "1 minute".(For what it is worth, all 18 catalog entries are currently in this state. I am
starting with the two that need only
llama-server, so the dependency surfaceis as small as possible.)
What they do now
chat-endpoint— turns llama-server into a small REST API.code-assistant— same shape, tuned for code.Design points worth reviewing:
http://llama-server:8080— the manifest's in-networkport,not the published
external_port_default(11434). n8n is onods-networkwith everything else, so the request never leaves the Docker network. Same
reasoning as the rest of the stack talking service-to-service.
code-assistantand defaults to 0.7 forchat, overridable per request.
rather than letting the HTTP node fail with a provider error the caller
cannot interpret.
curlexample instead of aplaceholder.
AI Assistance
AI assisted with drafting the node graphs, the system prompts, and this
description. I chose the endpoints and ports against the service manifests,
built the validation harness described below, and fixed the one real defect it
found before pushing.
Release Lane
release/2.6.xmainStable hotfix reason:
Changed Surface
(Two JSON files under
config/n8n/. These are import payloads for n8n; no ODScode reads them at runtime. The catalog entries, categories, dependencies, ids
and filenames are unchanged.)
Risk And Validation
git diff --checkrelease/2.6.xCommands/results:
Caveat, and the one thing I could not do: Docker is not running on my dev
host, so I could not stand up n8n + llama-server and fire a real request end to
end. Everything above is static validation against the real node definitions —
it proves the files import and that no node has an invented parameter or
version, but it does not prove the llama-server response shape flows through
the expression in
Return Replyat runtime. That expression reads$json.choices[0].message.content, which is the standard OpenAI-compatiblechat response llama.cpp's server returns, and is the same path
scripts/ods-test-functional.shasserts on. If you would like a live runbefore merging, say so and I will get one on a machine with Docker.
Operational Change Check
These files are import payloads for n8n. Nothing in the installer, compose
stack,
ods-cli, or dashboard-api executes them — dashboard-api only readscatalog.jsonfor the Workflows page listing, and the file itself is sent ton8n's import API when the user clicks install. No existing install is affected
until a user chooses to import.
Notes For Reviewers
On the model id. Both workflows send
"model": "local-model". llama.cpp'sserver ignores the field and serves whatever model it was started with, so any
string works — but if you would rather these read the configured
LLM_MODEL,n8n would need it in its environment (
compose.yamldoes not pass it today).Say the word and I will send that as a separate change rather than smuggling an
env addition into a workflow PR.
On webhook paths. I used
ods-chatandods-code. They are unregistereduntil a user activates the workflow, and I checked no other catalog workflow
claims them. If you have a naming convention for ODS-shipped webhooks, tell me
and I will rename.
Should the remaining 16 follow? I would like to keep going — the voice ones
(whisper, tts) and the RAG ones (qdrant, embeddings) are the obvious next
batch. Tell me if you would rather they land as one large PR than as a series,
or if the whole idea needs an issue first.
Related: #2495 adds a catalog contract test whose connection-graph assertions
cover files like these. Independent change, no overlapping lines.