From 77bd235f6421b760a3599071424f5182257c27c9 Mon Sep 17 00:00:00 2001 From: GAOJIAN-0106 <57715944+GAOJIAN-0106@users.noreply.github.com> Date: Sun, 26 Apr 2026 16:53:04 +0800 Subject: [PATCH 1/2] fix: correct invalid OPENROUTER_DEFAULT model ID google/gemini-flash-2.0 is not a valid OpenRouter model ID (segments reversed). Every rerank and FunJudge call fails with HTTP 400 when REASONING_PROVIDER=openrouter and LAST30DAYS_RERANK_MODEL is not explicitly pinned, silently falling back to local-score heuristics. OpenRouter error body: {"message":"google/gemini-flash-2.0 is not a valid model ID","code":400} Switching to google/gemini-3.1-flash-lite-preview, which matches the GEMINI_FLASH_LITE constant already used by the native Gemini provider on line 12 of the same file. This makes the Gemini and OpenRouter providers consistent and avoids a future divergence. Validated with /last30days 'Claude Opus 4.7' --quick: - Rerank/FunJudge HTTP 400 errors: 1 per run -> 0 - 'Why: fallback-local-score' markers in output: every cluster -> 0 - LLM-generated 'Why:' reasoning lines: 0 -> 11 --- skills/last30days/scripts/lib/providers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skills/last30days/scripts/lib/providers.py b/skills/last30days/scripts/lib/providers.py index 09040f2..72721b0 100644 --- a/skills/last30days/scripts/lib/providers.py +++ b/skills/last30days/scripts/lib/providers.py @@ -19,7 +19,7 @@ OPENAI_RESPONSES_URL = "https://api.openai.com/v1/responses" CODEX_RESPONSES_URL = "https://chatgpt.com/backend-api/codex/responses" XAI_RESPONSES_URL = "https://api.x.ai/v1/responses" OPENROUTER_URL = "https://openrouter.ai/api/v1/chat/completions" -OPENROUTER_DEFAULT = "google/gemini-flash-2.0" +OPENROUTER_DEFAULT = "google/gemini-3.1-flash-lite-preview" class ReasoningClient: From aef6f354605bc9cc0a08229d9e4b64b4b4670112 Mon Sep 17 00:00:00 2001 From: Trevin Chow Date: Sun, 17 May 2026 00:59:31 -0700 Subject: [PATCH 2/2] docs(providers): note why OpenRouter slug includes -preview suffix --- skills/last30days/scripts/lib/providers.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/skills/last30days/scripts/lib/providers.py b/skills/last30days/scripts/lib/providers.py index 72721b0..dffec4b 100644 --- a/skills/last30days/scripts/lib/providers.py +++ b/skills/last30days/scripts/lib/providers.py @@ -19,6 +19,10 @@ OPENAI_RESPONSES_URL = "https://api.openai.com/v1/responses" CODEX_RESPONSES_URL = "https://chatgpt.com/backend-api/codex/responses" XAI_RESPONSES_URL = "https://api.x.ai/v1/responses" OPENROUTER_URL = "https://openrouter.ai/api/v1/chat/completions" +# OpenRouter routes the Gemini Flash Lite tier as the -preview slug; that is the +# stable form on that routing layer even though native Gemini's GEMINI_FLASH_LITE +# constant is suffix-free. If GEMINI_FLASH_LITE moves to a non-preview stable ID, +# double-check that OpenRouter's slug still maps to the same upstream model. OPENROUTER_DEFAULT = "google/gemini-3.1-flash-lite-preview"