Commit Graph
24 Commits
Author SHA1 Message Date
Gerald LonlasandClaude Opus 4.7 2301e15111 fix: include both endpoint errors when chat.completions fallback also fails
When the responses endpoint fails and the chat.completions fallback also
fails (raises or returns empty), the original responses error was captured
in fallback_reason but never surfaced. Wrap the fallback call in its own
try/except and re-raise a RuntimeError that chains both errors with
context, so users see why both endpoints failed.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-19 00:46:20 +08:00
Gerald Lonlas 75792130b0 docs(test): add unit test execution command v0.1 2026-03-05 01:29:10 +08:00
Gerald Lonlas 93a0268b52 test: cover image node, routes, entrypoint, and data types 2026-03-05 01:28:29 +08:00
Gerald Lonlas cbace183ca test(nodes): add connect and text-gen unit coverage 2026-03-05 01:26:53 +08:00
Gerald Lonlas 8c10bf002e test(client): cover parsing, seed, and image helper branches 2026-03-05 01:25:03 +08:00
Gerald Lonlas 99a2477a5a test: add pytest harness and coverage configuration 2026-03-05 01:23:15 +08:00
Gerald Lonlas 10bb68dd98 merge: codex/lmstudio-remote-node into master 2026-03-05 00:25:34 +08:00
Gerald Lonlas 6a63d2f1e4 docs: add concise README with screenshot and project disclaimer 2026-03-05 00:23:05 +08:00
Gerald LonlasandClaude Sonnet 4.6 ccef35cec7 fix(image-to-text): surface batch frame loss in chat.completions fallback
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>
2026-03-04 21:11:37 +08:00
Gerald LonlasandClaude Sonnet 4.6 969e3acb19 fix: api key normalization, UI typo, dead code, route timeout
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>
2026-03-04 21:11:30 +08:00
Gerald LonlasandClaude Sonnet 4.6 617100dbe6 fix(tests): correct broken seed and think-content test assertions
- 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>
2026-03-04 21:11:19 +08:00
Gerald Lonlas 42e7f9b382 refactor: simplify image-to-text outputs to response only 2026-03-04 16:04:13 +08:00
Gerald Lonlas 382db13ec2 fix: always strip <think> blocks from text and image response outputs 2026-03-04 15:43:59 +08:00
Gerald Lonlas 6afa30d350 refactor: simplify text gen outputs to response only 2026-03-04 15:24:08 +08:00
Gerald Lonlas 466ec9d001 feat: strip <think> reasoning blocks from text output when reasoning is enabled 2026-03-04 14:52:18 +08:00
Gerald Lonlas a5b030aabd fix: preserve connect widget order for api token and model dropdown 2026-03-04 14:46:45 +08:00
Gerald Lonlas 4a1fbd9acc feat: reorder LMStudio connect fields and move connectivity test to advanced 2026-03-04 14:42:32 +08:00
Gerald Lonlas ec1ac92bb1 feat: make prompt textareas mouse-resizable on LMStudio text nodes 2026-03-04 14:38:03 +08:00
Gerald Lonlas cc556cb5af fix: avoid combo whitelist validation and defer linked prompt checks to execute 2026-03-04 14:32:43 +08:00
Gerald Lonlas a78b9b0e8d fix: handle None prompt values during node validation and message build 2026-03-04 14:21:38 +08:00
Gerald Lonlas 5624847c18 feat: add connect-node web controls, docs, and client tests 2026-03-04 14:04:45 +08:00
Gerald Lonlas e99858f857 feat: implement LMStudio connect, text-gen and image-to-text nodes 2026-03-04 14:04:42 +08:00
Gerald Lonlas 8b253a85f4 feat: add LMStudio OpenAI client helpers and safe seed handling 2026-03-04 14:04:34 +08:00
Gerald Lonlas 8d891c4403 chore: bootstrap package metadata and shared io types 2026-03-04 14:04:17 +08:00