Motivation: Expose the parsed reasoning_content to downstream ComfyUI nodes so users can route or display the internal thoughts of models like DeepSeek.
Implementation: Appended 'reasoning' to RETURN_TYPES and RETURN_NAMES in openai_compatible.py. Updated _success and _error_result standard return tuple length from 3 to 4.
Motivation: Absorbing robust API handling strategies from comfyui_LLM_party to enhance compatibility with newer models (o1/o3) and models that return internal thought processes (DeepSeek/R1).
Implementation: 1. o1/o3 Compatibility: Intercept payload building to convert unsupported 'system' roles to 'user' roles and spoof an 'assistant' acknowledgment. 2. DeepSeek Readiness: Parse official 'reasoning_content' or fallback to regex extraction of 'think' blocks, stripping them from the main ComfyUI text output to keep prompts clean.
Motivation:
The enable_memory feature was incomplete because it only stored the user's prompts in the history array without appending the assistant's previous replies. This resulted in context-blind multi-turn interactions.
Implementation:
Added logic to append the assistant's response to self._conversation_history right before returning the success result, completing the conversational loop.
Motivation:
Internal planning files and temporary test scripts should not be part of the public repository.
Implementation:
1. Deleted task_plan.md and removed from git tracking.
2. Untracked test_api.py (keeping local copy) and added both to .gitignore.
Motivation:
JSONCombine was failing with 'dict' has no attribute 'strip' when receiving dictionary inputs, and strict APIs (like Qwen) returned 400 Errors when receiving the non-standard 'seed' field in the payload.
Implementation:
Updated JSONCombine in json_builder.py to handle both string and dict types safely. Removed the seed field from the API payload in openai_compatible.py to strictly follow CONTRIBUTING.md Rule 3.1 and ensure standard OpenAI compatibility.
Motivation:
LLM API calls frequently failed with HTTP 429 and 50x errors, crashing the workflow. Code redundancy existed between different LLM nodes. Non-standard payload fields caused 400 errors with some providers.
Implementation:
1. Extracted api_client.py for centralized HTTP handling with smart retries (Retry-After, backoff, jitter) and structured error logging.
2. Implemented graceful degradation to return error text instead of raising exceptions.
3. Cleaned up non-standard OpenAI payload fields.
4. Added input validation to fail fast on empty prompts or API keys.
5. Refactored both openai_compatible.py and llm_translator.py to reuse LLMClient.
6. Handled dual import registration in __init__.py for robust dynamic loading.
Motivation:
urllib.request.urlopen without explicit SSL context causes UNEXPECTED_EOF_WHILE_READING on some Python/env combos. Transient network errors also need graceful handling.
Implementation:
Added ssl.create_default_context() and 3-attempt retry loop for SSL/URLError/ConnectionError/TimeoutError in _call_api. Also added iFlow/心流 provider to LLM_Loader.
Motivation:
Translation node better fits under the Utility category for grouping practical helper nodes.
Implementation:
Changed CATEGORY from Translation to Utility in llm_translator.py.
Motivation:
from nodes.openai_compatible import ProviderRegistry clashed with ComfyUI's own nodes module, causing the LLM_Loader node to fail loading entirely.
Implementation:
Reverted to a local _BASE_URL_MAPPING dict, keeping the dead import cleanup from the previous refactor. The mapping is now self-contained with no cross-module dependencies.
Motivation:
Ensure a clean, professional, and accessible documentation style by removing decorative emojis.
Implementation:
Removed all emoji characters from headers, lists, and tables in README.md.
Motivation:
Introduce a dedicated translation node for simplified workflows, enhance error logging, and make the project accessible to a global audience with a default English README.
Implementation:
1. Implemented LLMTranslator node with auto-language detection and glossary support.
2. Enhanced OpenAICompatibleLoader with request size tracking and detailed error diagnostics.
3. Renamed README.md -> README_CN.md and created a new idiomatic English README.md with language switchers.
4. Added docs/llm_translator_guide.md and removed redundant docs/readme_en.md.
- Add StringTemplate node for variable replacement in strings using JSON context.
- Update .gitignore to recursively exclude __pycache__ directories.
- Fix OpenAICompatibleLoader to use synchronous API calls, preventing event loop errors.
Two separate nodes for different use cases:
- JSONBuilder5: 5 key-value pairs
- JSONBuilder10: 10 key-value pairs
All keys are editable text boxes, all values are forceInput.
No dynamic widgets - 100% reliable serialization.
BREAKING CHANGE: Removed dynamic input_count approach entirely
New design:
- keys: multiline text box (one key name per line)
- value_1 ~ value_10: fixed input slots
- Line 1 → value_1, Line 2 → value_2, etc.
Removed frontend JS - no dynamic widgets needed.
This is the most reliable approach since ComfyUI doesn't
support dynamic widget value passing to backend.
Implementation:
- Keys: addWidget('text') with custom serializeValue()
- Values: addInput() for connection slots
- onSerialize: saves dynamic key widget values to node properties
- onConfigure: restores key widgets on workflow load
This allows keys to be pure editable text boxes (not forceInput)
while still being properly serialized and restored.
BREAKING CHANGE: Keys now use forceInput=False (can type OR connect)
- Backend: key_N uses forceInput=False, value_N uses forceInput=True
- Frontend: dynamically adds both as proper inputs (not widgets)
- This ensures ComfyUI correctly serializes dynamic inputs
- Fixes issue where dynamically added keys were not being loaded
- Custom draw function for button rendering
- Blue gradient background (#3a6ea5 → #2c5282)
- Rounded corners (6px radius)
- Subtle border and top highlight
- Icon prefix (⟳) for visual appeal
- Follows Google Material Design principles
Changes:
- Removed unnecessary base_json parameter
- Keys are now editable text widgets (not forceInput)
- Values remain as input slots for upstream connections
- Frontend JS updated to add text widgets for keys
- Added inputcount parameter for unlimited key-value pairs
- Added base_json input for chaining multiple builders
- Pattern inspired by KJNodes' JoinStringMulti design
- User can adjust inputcount and click Update to add more inputs
JSON Builder:
- Build JSON from up to 5 key-value pairs
- Auto-parse values (string or nested JSON)
- Category: 🚦ComfyUI_LLMs_Toolkit/JSON
JSON Fixer:
- Fix malformed JSON from LLM outputs
- Handle: trailing commas, single quotes, markdown code blocks
- Extract JSON from surrounding text
- Category: 🚦ComfyUI_LLMs_Toolkit/JSON
Also fixed JSON Extractor to use forceInput for upstream connection.
- Renamed config/env.example to .env.example (following industry standard .env conventions).
- Streamlined .env.example with API key placeholders and pointers to documentation.
- Removed legacy config/ directory.