Integrating Github AI Models with n8n for Custom AI Workflows

somdn_product_page

This n8n workflow enables seamless integration of GitHub’s AI models into custom workflows by creating a bridge to access their models via a customized OpenAI-compatible API. It fetches available models, triggers chat completions, and responds with AI-generated content, making it practical for developers seeking to leverage free or low-cost AI models within their automation routines.

The workflow begins by setting up two webhooks: one to list all available GitHub AI models and another to handle chat completion requests. It uses a custom OpenAI credential with a modified base URL pointing to these webhooks. When a chat message is received through the trigger node, it determines if the response is stream-based. If so, it directly returns the AI response; otherwise, it responds with the full data.

Key nodes include the “GET models” webhook that calls GitHub’s model listing API, and the “POST ChatCompletions” webhook for executing chat completions with GitHub models. The workflow also remaps API responses to be compatible with existing n8n LLM nodes, allowing users to interact with GitHub’s models directly within their AI workflows.

Practical use cases include experimenting with leading AI models without cost, prototyping AI agents, or integrating GitHub’s models into larger automation frameworks to enhance data analysis, customer service, or intelligent chatbots.

Node Count

11 – 20 Nodes

Nodes Used

@n8n/n8n-nodes-langchain.chainLlm, @n8n/n8n-nodes-langchain.chatTrigger, @n8n/n8n-nodes-langchain.lmChatOpenAi, aggregate, httpRequest, if, respondToWebhook, stickyNote, webhook

Reviews

There are no reviews yet.

Be the first to review “Integrating Github AI Models with n8n for Custom AI Workflows”

Your email address will not be published. Required fields are marked *