diff --git a/core/framework/agent_loop/internals/tool_result_handler.py b/core/framework/agent_loop/internals/tool_result_handler.py index 7515a20f..fda01613 100644 --- a/core/framework/agent_loop/internals/tool_result_handler.py +++ b/core/framework/agent_loop/internals/tool_result_handler.py @@ -217,7 +217,7 @@ def truncate_tool_result( When *spillover_dir* is configured, EVERY non-error tool result is written to disk for debugging. The LLM-visible content is then shaped to avoid a **poison pattern** that we traced on 2026-04-15 - through a gemini-3.1-pro-preview queen session: the prior format + through a gemini-3.1-pro-preview-customtools queen session: the prior format appended ``\\n\\n[Saved to '/abs/path/file.txt']`` after every small result, and frontier pattern-matching models (gemini 3.x in particular) learned to autocomplete the `[Saved to '...']` trailer diff --git a/core/framework/llm/model_catalog.json b/core/framework/llm/model_catalog.json index e2abdaaa..2f50b865 100644 --- a/core/framework/llm/model_catalog.json +++ b/core/framework/llm/model_catalog.json @@ -64,7 +64,7 @@ "max_context_tokens": 900000 }, { - "id": "gemini-3.1-pro-preview", + "id": "gemini-3.1-pro-preview-customtools", "label": "Gemini 3.1 Pro - Best quality", "recommended": true, "max_tokens": 32768, @@ -305,7 +305,7 @@ "max_context_tokens": 872000 }, { - "id": "google/gemini-3.1-pro-preview", + "id": "google/gemini-3.1-pro-preview-customtools", "label": "Gemini 3.1 Pro Preview - Long-context reasoning", "recommended": false, "max_tokens": 32768, diff --git a/core/tests/test_model_catalog.py b/core/tests/test_model_catalog.py index 92ff9107..e0df7824 100644 --- a/core/tests/test_model_catalog.py +++ b/core/tests/test_model_catalog.py @@ -150,7 +150,7 @@ def test_openrouter_catalog_tracks_current_frontier_set(): "openai/gpt-5.4", "anthropic/claude-sonnet-4.6", "anthropic/claude-opus-4.6", - "google/gemini-3.1-pro-preview", + "google/gemini-3.1-pro-preview-customtools", "deepseek/deepseek-v3.2", ] assert openrouter_models[0]["max_tokens"] == 128000