- Delete client.dump_openai_response (and its import json): never called
from any production path (connect_node, text_gen_node, image_to_text_node,
routes, __init__); existed only as a debugging aid.
- Delete its test (test_dump_openai_response_branches in test_client_full.py)
and the now-orphaned `import json` in that file.
- Delete make_response_with_output_text / make_response_with_output_items
from tests/helpers/fakes.py: defined in the initial test scaffolding
commit but never imported or referenced by any test module.
All 68 tests pass; branch coverage holds at 96.93 % (> 90 % required).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
In `extract_responses_text`, the loop over non-dict output items extracted
text from `item.content[].text` AND unconditionally also from `item.text`.
When an item carried both attributes (e.g. an OpenAI Responses API message
object that exposes `.content` as a list and also a convenience `.text`
shorthand), the same content was appended twice, producing a response like
`"the-answer\nthe-answer"` instead of `"the-answer"`.
The dict-item branch already used `continue` to prevent this; mirror that
guard in the object branch by making `item.text` extraction an `else` clause
that only runs when `item.content` is NOT a list.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
When the responses endpoint fails and execution falls back to
chat.completions, only the first image in a batch can be forwarded
(chat.completions accepts a single image_url per message in this
implementation). Previously extra frames were silently dropped.
Now we record batch_size before entering the fallback and append a plain-
language warning to fallback_reason when batch_size > 1, so the status
preview shown in ComfyUI makes the degradation explicit.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
connect_node.py
- Fix UI label typo: "Enable Reasonning" → "Enable Reasoning"
- Use normalize_api_key() instead of an inline (api_token or "-").strip()
expression; the helper also checks DEFAULT_API_KEY_PLACEHOLDER so both
code paths now agree on the canonical fallback value
client.py
- Remove build_responses_input_with_image(): dead code; image_to_text_node
builds its own multi-image payload directly in _responses_kwargs() and
this function was never imported or called
routes.py
- _test_handler default timeout: 600 s → 15 s, consistent with
_models_handler. Both handlers probe connectivity identically; a 10-min
default on a "Test Connection" button is a foot-gun when called without
a timeout_seconds query param.
- Drop now-unused DEFAULT_TIMEOUT_SECONDS import
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- coerce_seed("") returns None, not ValueError; move "" out of the
invalid-values parametrize and give it its own explicit assertion
- strip_think_content tests used \\n (literal backslash-n) instead of
real newlines; .strip() cannot remove backslash or 'n' so the dangling-
tag test always failed. Replace with actual \n to match real LLM output.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>