[object Object]

← back to Ticket System

run-ticket: add local-qwen-14b-mac1 runner to offload qwen to Mac1

516f09bb2836def356c35c6f0036a5b4e24586da · 2026-09-11 14:23:28 -0700 · Steve Abrams

Mac2 is memory-starved (swap grew to 48GB and sits ~97% used), so local qwen
inference has collapsed: the same 2-token prompt benchmarks 0.32s on Mac1 vs
95.31s locally, ~300x. qwen3:14b is installed on both boxes.

Verified by watching Mac1's /api/ps expires_at advance (14:48:06 -> 14:57:28)
only under this exact config; the two failed attempts left it untouched.

Four gotchas, each confirmed rather than assumed:
  - OLLAMA_HOST is ignored; the codex binary has no such string (hardcoded :11434)
  - the provider cannot be named 'ollama' (reserved built-in, override refused)
  - wire_api must be 'responses'; 'chat' is rejected as no longer supported
  - base_url must end in /v1, else codex GETs /responses and 404s

Additive: existing runners are untouched, so nothing changes until a caller opts
in with local-qwen-14b-mac1.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

Files touched

Diff

commit 516f09bb2836def356c35c6f0036a5b4e24586da
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Fri Sep 11 14:23:28 2026 -0700

    run-ticket: add local-qwen-14b-mac1 runner to offload qwen to Mac1
    
    Mac2 is memory-starved (swap grew to 48GB and sits ~97% used), so local qwen
    inference has collapsed: the same 2-token prompt benchmarks 0.32s on Mac1 vs
    95.31s locally, ~300x. qwen3:14b is installed on both boxes.
    
    Verified by watching Mac1's /api/ps expires_at advance (14:48:06 -> 14:57:28)
    only under this exact config; the two failed attempts left it untouched.
    
    Four gotchas, each confirmed rather than assumed:
      - OLLAMA_HOST is ignored; the codex binary has no such string (hardcoded :11434)
      - the provider cannot be named 'ollama' (reserved built-in, override refused)
      - wire_api must be 'responses'; 'chat' is rejected as no longer supported
      - base_url must end in /v1, else codex GETs /responses and 404s
    
    Additive: existing runners are untouched, so nothing changes until a caller opts
    in with local-qwen-14b-mac1.
    
    Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
---
 run-ticket.sh | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/run-ticket.sh b/run-ticket.sh
index 6a401f04..6c5475da 100755
--- a/run-ticket.sh
+++ b/run-ticket.sh
@@ -5,7 +5,7 @@
 # authored ticket title ever reaches a shell). Steve, TK-10527 (2026-08-13):
 # "run ticket like the approvals opens a new iterm2 terminal with claude loaded first."
 #
-# Usage: run-ticket.sh <TK-id> [start-dir] [claude-sonnet|claude-opus|claude-haiku|claude-opus-5|claude-sonnet-5|claude-fable|codex|codex-gpt6|codex-gpt52|local-qwen-27b|local-qwen-14b]
+# Usage: run-ticket.sh <TK-id> [start-dir] [claude-sonnet|claude-opus|claude-haiku|claude-opus-5|claude-sonnet-5|claude-fable|codex|codex-gpt6|codex-gpt52|local-qwen-27b|local-qwen-14b|local-qwen-14b-mac1]
 set -euo pipefail
 
 ID="${1:?usage: run-ticket.sh <TK-id> [start-dir]}"
@@ -35,6 +35,21 @@ case "$PROFILE" in
   codex-gpt52)   RUNNER=(/Users/macstudio3/.local/bin/codex --model gpt-5.2); AGENT_PREFIX=codex-run ;;
   local-qwen-27b) RUNNER=(/Users/macstudio3/.local/bin/codex --oss --local-provider ollama --model qwen3.8-27b-heretic:latest); AGENT_PREFIX=local-qwen-27b-run ;;
   local-qwen-14b) RUNNER=(/Users/macstudio3/.local/bin/codex --oss --local-provider ollama --model qwen3:14b); AGENT_PREFIX=local-qwen-14b-run ;;
+  # TK-11519: route qwen to Mac1 (192.168.1.133). Mac2 is memory-starved — same prompt
+  # benchmarked 0.32s on Mac1 vs 95.31s locally (~300x). VERIFIED 2026-09-11 by watching
+  # Mac1's /api/ps expires_at advance (14:48:06 -> 14:57:28) only on this exact config.
+  # Gotchas, each confirmed the hard way:
+  #   * OLLAMA_HOST does NOT work — the codex binary contains no such string (hardcoded :11434).
+  #   * provider CANNOT be named "ollama" — reserved built-in ID, override is refused.
+  #   * wire_api MUST be "responses"; "chat" is rejected as no longer supported.
+  #   * base_url MUST end in /v1 — without it codex GETs /responses and 404s.
+  #   * do NOT pass --oss here; that forces the built-in local provider back on.
+  local-qwen-14b-mac1) RUNNER=(/Users/macstudio3/.local/bin/codex \
+    -c model_providers.mac1.name="Mac1 Ollama" \
+    -c model_providers.mac1.base_url=http://192.168.1.133:11434/v1 \
+    -c model_providers.mac1.wire_api=responses \
+    -c model_provider=mac1 \
+    --model qwen3:14b); AGENT_PREFIX=local-qwen-14b-mac1-run ;;
   *) echo "run-ticket: refusing unknown profile '$PROFILE'" >&2; exit 2 ;;
 esac
 

← 965470be TK-11506: bound cache retention with idle eviction  ·  back to Ticket System  ·  auto-data-snapshot: 2026-09-11T14:39:38 (2 data files) — des 16c35905 →