diff --git a/rlm_query b/rlm_query index 61dfb66..916d66e 100755 --- a/rlm_query +++ b/rlm_query @@ -165,7 +165,7 @@ fi # Trace logging (optional) # ---------------------------------------------------------------------- if [ -n "${PI_TRACE_FILE:-}" ]; then - echo "[$(date +%H:%M:%S.%3N)] depth=$DEPTH→$NEXT_DEPTH PID=$$ PPID=$PPID call=$RLM_CALL_COUNT trace=$RLM_TRACE_ID fork=$FORK prompt: ${PROMPT:0:120}" >> "$PI_TRACE_FILE" + echo "[$(date +%H:%M:%S.%3N)] depth=${DEPTH}→${NEXT_DEPTH} PID=$$ PPID=$PPID call=$RLM_CALL_COUNT trace=$RLM_TRACE_ID fork=$FORK prompt: ${PROMPT:0:120}" >> "$PI_TRACE_FILE" fi # ---------------------------------------------------------------------- diff --git a/tests/test_unit.sh b/tests/test_unit.sh index 5f9425a..0abba60 100644 --- a/tests/test_unit.sh +++ b/tests/test_unit.sh @@ -340,7 +340,8 @@ OUTPUT=$( CONTEXT="$TEST_TMP/ctx.txt" \ rlm_query "How many r's in strawberry?" ) -assert_contains "T14d: prompt file is set" "RLM_PROMPT_FILE=/tmp/rlm_prompt_" "$OUTPUT" +assert_contains "T14d: prompt file is set" "RLM_PROMPT_FILE=" "$OUTPUT" +assert_contains "T14d: prompt file path contains rlm_prompt" "rlm_prompt_" "$OUTPUT" assert_contains "T14d: prompt file has content" "PROMPT_CONTENT=How many r's in strawberry?" "$OUTPUT" # ─── Test Group: Temp File Cleanup ──────────────────────────────────────── diff --git a/ypi b/ypi index 5462c1d..7b3d525 100755 --- a/ypi +++ b/ypi @@ -121,7 +121,10 @@ while [[ $# -gt 0 ]]; do done # Launch Pi with the combined system prompt, passing all args through # User's own extensions (hashline, etc.) are discovered automatically by Pi. +# Pass through RLM_PROVIDER/RLM_MODEL to the root session if set. PI_ARGV=(pi --system-prompt "$COMBINED_PROMPT") +[ -n "${RLM_PROVIDER:-}" ] && PI_ARGV+=(--provider "$RLM_PROVIDER") +[ -n "${RLM_MODEL:-}" ] && PI_ARGV+=(--model "$RLM_MODEL") [ ${#YPI_EXT_ARGS[@]} -gt 0 ] && PI_ARGV+=("${YPI_EXT_ARGS[@]}") [ ${#PASS_ARGS[@]} -gt 0 ] && PI_ARGV+=("${PASS_ARGS[@]}") exec "${PI_ARGV[@]}"