Adds OllamaOptionDisableThinking, a composable node chaining into the
same OLLAMA_OPTIONS socket every other OllamaOption* node uses. Unlike
those (Ollama-native sampling params passed through verbatim), the
"think" key it emits is a comfydv-level convention: every LLMProvider
implementation pops it out of options and translates it to its own wire
shape before building a request, since neither backend recognizes a
literal "think" key nested inside a generic options object.
Confirmed live: Ollama's native /api/chat and OpenAI-compatible
/v1/chat/completions both silently ignore "think" nested in options —
it must be a top-level request field, or the model burns its whole
token budget on chain-of-thought reasoning before ever responding
(eval_count: 223 vs 2 in a direct comparison). llama.cpp's translation
(chat_template_kwargs/reasoning_effort) is sourced from llama-server's
documented request-body fields, not live-verified against a running
instance.
This also fixes two existing live integration tests that already passed
options={"think": False} under the mistaken assumption it worked — it
was a silent no-op until now.
See ADR-010 for the full design discussion, including why this ended up
as a composable option node rather than a new ChatCompletion input.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YArD9ZjBWKsAvazmS48amA
4.3 KiB
4.3 KiB
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog.
[Unreleased]
Added
- BEACON framework bootstrap: problem statement, constitution, roadmap, architecture document
CHANGELOG.md(this file)- README: What-is-this, Install, and Quickstart sections
LLMProviderprotocol (comfydv._llm) — a shared adapter boundary so ComfyUI LLM nodes work with any backend that implements it, starting withOllamaProvider. Structured output now goes throughpydantic-ai(ADR-007), superseding the hand-rolled Ollama tool-calling approach.- Chat Completion now accepts an optional
imageinput for vision-capable models (VLMs): wire a ComfyUIIMAGEand the connected model can describe or reason about it. Works identically on both backends (Ollama multimodal models; llama.cpp launched with--mmproj), and composes with structured output and multi-turn history. Images are carried onMessage.imagesand translated to each backend's native shape (Ollama's flatimagesarray, llama.cpp's OpenAIimage_urlparts, pydantic-aiBinaryContenton the structured path) — ADR-008, extending ADR-007's adapter pattern to a second input modality. Text-only workflows are unchanged when no image is wired. - Ollama Option — Disable Thinking node: turn off (or explicitly re-enable) a "thinking"-capable model's chain-of-thought reasoning. Chains into the same composable
OLLAMA_OPTIONSsocket every otherOllamaOption*node uses, but works for both backends — eachLLMProviderimplementation pops thethinkkey back out and translates it to its own wire shape (Ollama: a top-levelthinkfield; llama.cpp:chat_template_kwargs/reasoning_effortrequest-body fields, not live-verified — see ADR-010).
Changed
- Breaking:
OllamaChatCompletion→ChatCompletion,OllamaModelSelector→LLMModelSelector,OllamaLoadModel→LLMLoadModel,OllamaUnloadModel→LLMUnloadModel, and theOLLAMA_CLIENTsocket type →LLM_CLIENT— these nodes are now backend-generic.OllamaClientis unchanged by name but now outputs anOllamaProviderrather than a plain string; existing saved workflows using the old node/socket names need reconnecting (seecomfydv.ollama.MIGRATION_MAPfor the full old→new mapping). ChatCompletion'sstructured_output=Truepath now routes Ollama through Ollama's native/api/chat+"format"instead of the sharedpydantic-aiOpenAI-compat path — Ollama's OpenAI-compatible endpoint was found to silently reload the model at its default context size on every call, discarding anyoptions(e.g.num_ctx) override.LlamaCppProvideris unaffected and keeps the shared path, switched topydantic-ai'sNativeOutputmode (ADR-009).
Fixed
structured_output=Truerequests could fail validation ("token limit exceeded before any response was generated") against "thinking"-capable models, which spent their whole token budget on chain-of-thought reasoning before ever producing the structured response (ADR-009).- A non-required structured-output schema field rejected an explicit
nullvalue from the model (only an omitted field was tolerated), even though models routinely emit explicitnullfor absent optional fields.
[0.1.0] — 2026-06-01
Added
FormatStringnode: dynamic string formatting via Python f-strings or Jinja2SandboxedEnvironment- Auto-detects template variables and exposes them as typed input sockets
- Outputs fixed at positions 0 (
formatted_string) and 1 (saved_file_path); variable pass-through at 2+ - Registers aiohttp routes on ComfyUI's
PromptServerfor live widget updates from the JS layer
RandomChoicenode: seed-controlled selection from an arbitrary number of typed inputsCircuitBreakernode: raisesInterruptProcessingExceptionto halt a queue run without crashing ComfyUI- Comprehensive pytest suite runnable without a live ComfyUI instance
- MkDocs-material documentation site at darth-veitcher.github.io/comfydv
Changed
FormatStringoutput order reversed soformatted_stringandsaved_file_pathare always at fixed positions 0 and 1 (previously variable outputs came first, which broke workflow connections on re-render)