From 753ecd6855adbc0a8a6c20278cff63adeab09983 Mon Sep 17 00:00:00 2001 From: ATKabli Date: Thu, 6 Aug 2026 07:52:14 +0300 Subject: [PATCH] fix: crash in --llm-rerank output for model names without a dash llm_model.split('-')[1] raises IndexError for any model tag that contains no dash (e.g. an Ollama tag like 'qwen3:8b' or an OpenAI-compat route like 'spark/fast'), crashing locomo_bench.py at startup when --llm-rerank is enabled and longmemeval_bench.py on the diary pre-compute path. Both sites only build display strings, so print the full model tag instead of guessing at a short name. Hit in practice when pointing --llm-backend ollama at a LiteLLM gateway with provider-prefixed model routes. --- benchmarks/locomo_bench.py | 2 +- benchmarks/longmemeval_bench.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/benchmarks/locomo_bench.py b/benchmarks/locomo_bench.py index dd6dbc4..cdfbb58 100644 --- a/benchmarks/locomo_bench.py +++ b/benchmarks/locomo_bench.py @@ -665,7 +665,7 @@ def run_benchmark( palace_cache = json.load(f) print(f" Palace cache: {len(palace_cache)} room assignments loaded") - rerank_label = f" + LLM re-rank ({llm_model.split('-')[1]})" if llm_rerank_enabled else "" + rerank_label = f" + LLM re-rank ({llm_model})" if llm_rerank_enabled else "" print(f"\n{'=' * 60}") print(" MemPal × LoCoMo Benchmark") diff --git a/benchmarks/longmemeval_bench.py b/benchmarks/longmemeval_bench.py index 2cb9836..1cdc865 100644 --- a/benchmarks/longmemeval_bench.py +++ b/benchmarks/longmemeval_bench.py @@ -3015,7 +3015,7 @@ def run_benchmark( if unique_sessions and api_key and not skip_precompute: print( - f" Diary ingest: pre-computing {len(unique_sessions)} sessions with {llm_model.split('-')[1]}..." + f" Diary ingest: pre-computing {len(unique_sessions)} sessions with {llm_model}..." ) done = 0 cache_path = Path(diary_cache_file) if diary_cache_file else None