Fix my tool model preset switching

This commit is contained in:
chengyongru
2026-06-18 00:03:13 +08:00
committed by Xubin Ren
parent bdf21c932b
commit ef6da0a94e
5 changed files with 84 additions and 9 deletions
+3 -1
View File
@@ -36,7 +36,8 @@ always: true
| Situation | Command |
|-----------|---------|
| Large codebase analysis | `my(action="set", key="context_window_tokens", value=131072)` |
| Repetitive simple tasks | `my(action="set", key="model", value="<fast-model>")` |
| Switch to a named model preset | `my(action="set", key="model_preset", value="<preset-name>")` |
| Repetitive simple tasks without a preset | `my(action="set", key="model", value="<fast-model>")` |
| Long multi-step task | `my(action="set", key="max_iterations", value=80)` |
**Tradeoff:** Bias toward stability. Only set when defaults are genuinely insufficient.
@@ -58,6 +59,7 @@ always: true
## Constraints
- All modifications in-memory only — restart resets everything
- Prefer `model_preset` for configured model choices. Direct `model` changes clear the active preset and should only be used when no preset exists.
- Protected params have type/range validation: `max_iterations` (1100), `context_window_tokens` (40961M), `model` (non-empty str)
- If `tools.my.allow_set` is false, check only