Skip to content

feat(models): add Atomic Chat local LLM provider plugin#3283

Open
yanalialiuk wants to merge 4 commits into
langgenius:mainfrom
yanalialiuk:feat/atomic-chat-provider
Open

feat(models): add Atomic Chat local LLM provider plugin#3283
yanalialiuk wants to merge 4 commits into
langgenius:mainfrom
yanalialiuk:feat/atomic-chat-provider

Conversation

@yanalialiuk

@yanalialiuk yanalialiuk commented Jun 12, 2026

Copy link
Copy Markdown

Summary

  • Add models/atomic_chat — a Dify model provider plugin for Atomic Chat
  • Connects to Atomic Chat's OpenAI-compatible Local API Server (default http://127.0.0.1:1337/v1)
  • Supports customizable LLM models with tool calling, streaming, and optional vision/thinking settings
  • Includes setup docs for local installs and Docker (host.docker.internal)

Why a plugin (not dify core)

Dify model providers live in dify-official-plugins and are loaded by plugin-daemon. This follows the same pattern as ollama, lemonade, and openai_api_compatible.

Test plan

  • Build/install plugin package in a Dify instance with plugin-daemon enabled
  • Add a model with endpoint http://127.0.0.1:1337/v1 (or http://host.docker.internal:1337/v1 from Docker)
  • Run a chat/workflow app using the configured Atomic Chat model
  • Verify credential validation succeeds when Atomic Chat Local API Server is running

yanalialiuk and others added 2 commits June 12, 2026 13:21
Add a Dify model provider plugin for Atomic Chat's OpenAI-compatible
Local API Server (default http://127.0.0.1:1337/v1), with LLM support,
credential validation, and setup docs.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@dosubot dosubot Bot added size:XL This PR changes 500-999 lines, ignoring generated files. enhancement New feature or request labels Jun 12, 2026
@yanalialiuk yanalialiuk temporarily deployed to models/atomic_chat June 12, 2026 10:22 — with GitHub Actions Inactive

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the Atomic Chat model provider for Dify, enabling local LLM integration via an OpenAI-compatible API. The implementation includes custom credential validation, multimodal support, and thinking/reasoning stream filtering. However, several issues need to be addressed: potential KeyError and AttributeError exceptions when accessing optional credential fields like mode and endpoint_url, a potential initialization failure when api_key is absent, and a bug in the stream filtering logic that can leak blocks if they are split across chunks. Additionally, the _CommonOpenAI helper class is currently unused dead code and should be integrated or removed.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread models/atomic_chat/models/llm/llm.py Outdated
Comment thread models/atomic_chat/models/llm/llm.py Outdated
Comment thread models/atomic_chat/models/llm/llm.py Outdated
Comment thread models/atomic_chat/models/llm/llm.py Outdated
Comment thread models/atomic_chat/models/llm/llm.py Outdated
Comment thread models/atomic_chat/models/common_openai.py Outdated
Replace copied openai_api_compatible llm.py with a focused Atomic Chat
adapter, trim provider YAML, and drop unused common_openai scaffolding.

Co-authored-by: Cursor <cursoragent@cursor.com>
@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:XL This PR changes 500-999 lines, ignoring generated files. labels Jun 12, 2026
@yanalialiuk yanalialiuk temporarily deployed to models/atomic_chat June 12, 2026 10:27 — with GitHub Actions Inactive
@yanalialiuk yanalialiuk deployed to models/atomic_chat June 12, 2026 10:32 — with GitHub Actions Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant