feat(fast): bounded /fast auto|cold windows behind one route-aware gate
Adds two bounded fast modes on top of the static /fast toggle, default OFF: - `auto`: every user turn opens a `agent.fast_auto_seconds` (default 60s) window; requests inside it carry the provider fast param, later tool-loop requests fall back to standard pricing. - `cold`: the same window, but only on the first turn of a session (no prior user/assistant/tool history). agent/fast_mode.py holds the whole policy: `begin_turn()` at the run_conversation ingress arms `agent._fast_until`; `effective_request_overrides()` is consumed in the ONE place request_overrides feed the transports (build_api_kwargs), so the fast param is a per-request kwarg only. System prompt, tools and messages are untouched — the prompt cache is preserved. resolve_fast_mode_overrides() is now the single gate for static and bounded modes and accepts provider/base_url: OpenRouter, Nous, Copilot, Azure, Bedrock and custom base_urls never receive service_tier/speed (#34308's route gating). Both existing callers (CLI turn route, gateway turn route) and the TUI config.set path pass the route. Surfaces: config `agent.service_tier: auto|cold` + `agent.fast_auto_seconds`, `/fast auto|cold` in CLI, gateway (picker gains both entries), TUI/desktop config.set; status shows the mode; web dashboard select lists the real values. Docs: configuration.md Fast Mode section with mode table + cost note, slash-commands, cli-config.yaml.example, locale strings for the two picker entries. Salvages #89991 (bounded fast modes) and #34308 (route gating). Fixes #64785, #74730. Co-authored-by: Eva <239388517+100yenadmin@users.noreply.github.com> Co-authored-by: kbaicai <kbaicai@qq.com>
This commit is contained in:
@@ -137,6 +137,8 @@ gateway:
|
||||
picker_title: "⚡ **Priority Processing**\\n\\nHuidige modus: `{mode}`\\n\\nKies \\'n opsie:"
|
||||
choice_fast: "fast — Priority Processing aan"
|
||||
choice_normal: "normal — standaardverwerking"
|
||||
choice_auto: "auto — vinnig vir die eerste sekondes van elke beurt"
|
||||
choice_cold: "cold — vinnig slegs vir die eerste beurt van 'n sessie"
|
||||
|
||||
footer:
|
||||
status: "📎 Looptyd-voetstuk: **{state}**\nVelde: `{fields}`\nPlatform: `{platform}`"
|
||||
|
||||
@@ -160,6 +160,8 @@ gateway:
|
||||
picker_title: "⚡ **المعالجة ذات الأولوية**\n\nالوضع الحالي: `{mode}`\n\nاختر خيارًا:"
|
||||
choice_fast: "fast — المعالجة ذات الأولوية مُفعّلة"
|
||||
choice_normal: "normal — المعالجة القياسية"
|
||||
choice_auto: "auto — سريع في الثواني الأولى من كل دور"
|
||||
choice_cold: "cold — سريع في الدور الأول من الجلسة فقط"
|
||||
|
||||
footer:
|
||||
status: "📎 تذييل التشغيل: **{state}**\nالحقول: `{fields}`\nالمنصّة: `{platform}`"
|
||||
|
||||
@@ -137,6 +137,8 @@ gateway:
|
||||
picker_title: "⚡ **Priority Processing**\\n\\nAktueller Modus: `{mode}`\\n\\nOption wählen:"
|
||||
choice_fast: "fast — Priority Processing an"
|
||||
choice_normal: "normal — Standardverarbeitung"
|
||||
choice_auto: "auto — schnell in den ersten Sekunden jedes Zugs"
|
||||
choice_cold: "cold — schnell nur im ersten Zug einer Sitzung"
|
||||
|
||||
footer:
|
||||
status: "📎 Laufzeit-Fußzeile: **{state}**\nFelder: `{fields}`\nPlattform: `{platform}`"
|
||||
|
||||
+4
-2
@@ -141,8 +141,8 @@ gateway:
|
||||
|
||||
fast:
|
||||
not_supported: "⚡ /fast is only available for OpenAI models that support Priority Processing."
|
||||
status: "⚡ Priority Processing\n\nCurrent mode: `{mode}`\n\n_Usage:_ `/fast <normal|fast|status>`"
|
||||
unknown_arg: "⚠️ Unknown argument: `{arg}`\n\n**Valid options:** normal, fast, status"
|
||||
status: "⚡ Priority Processing\n\nCurrent mode: `{mode}`\n\n_Usage:_ `/fast <normal|fast|auto|cold|status>`"
|
||||
unknown_arg: "⚠️ Unknown argument: `{arg}`\n\n**Valid options:** normal, fast, auto, cold, status"
|
||||
saved: "⚡ ✓ Priority Processing: **{label}** (saved to config)\n_(takes effect on next message)_"
|
||||
session_only: "⚡ ✓ Priority Processing: **{label}** (this session only)"
|
||||
label_fast: "FAST"
|
||||
@@ -152,6 +152,8 @@ gateway:
|
||||
picker_title: "⚡ **Priority Processing**\n\nCurrent mode: `{mode}`\n\nPick an option:"
|
||||
choice_fast: "fast — Priority Processing on"
|
||||
choice_normal: "normal — standard processing"
|
||||
choice_auto: "auto — fast for the first seconds of every turn"
|
||||
choice_cold: "cold — fast for the first turn of a session only"
|
||||
|
||||
footer:
|
||||
status: "📎 Runtime footer: **{state}**\nFields: `{fields}`\nPlatform: `{platform}`"
|
||||
|
||||
@@ -137,6 +137,8 @@ gateway:
|
||||
picker_title: "⚡ **Priority Processing**\\n\\nModo actual: `{mode}`\\n\\nElige una opción:"
|
||||
choice_fast: "fast — Priority Processing activado"
|
||||
choice_normal: "normal — procesamiento estándar"
|
||||
choice_auto: "auto — rápido en los primeros segundos de cada turno"
|
||||
choice_cold: "cold — rápido solo en el primer turno de una sesión"
|
||||
|
||||
footer:
|
||||
status: "📎 Pie de ejecución: **{state}**\nCampos: `{fields}`\nPlataforma: `{platform}`"
|
||||
|
||||
@@ -137,6 +137,8 @@ gateway:
|
||||
picker_title: "⚡ **Priority Processing**\\n\\nMode actuel : `{mode}`\\n\\nChoisissez une option :"
|
||||
choice_fast: "fast — Priority Processing activé"
|
||||
choice_normal: "normal — traitement standard"
|
||||
choice_auto: "auto — rapide pendant les premières secondes de chaque tour"
|
||||
choice_cold: "cold — rapide uniquement au premier tour d'une session"
|
||||
|
||||
footer:
|
||||
status: "📎 Pied de page d'exécution : **{state}**\nChamps : `{fields}`\nPlateforme : `{platform}`"
|
||||
|
||||
@@ -141,6 +141,8 @@ gateway:
|
||||
picker_title: "⚡ **Priority Processing**\\n\\nMód reatha: `{mode}`\\n\\nRoghnaigh rogha:"
|
||||
choice_fast: "fast — Priority Processing ar siúl"
|
||||
choice_normal: "normal — gnáthphróiseáil"
|
||||
choice_auto: "auto — tapa do na chéad soicindí de gach seal"
|
||||
choice_cold: "cold — tapa don chéad seal de sheisiún amháin"
|
||||
|
||||
footer:
|
||||
status: "📎 Buntásc rite: **{state}**\nRéimsí: `{fields}`\nArdán: `{platform}`"
|
||||
|
||||
@@ -137,6 +137,8 @@ gateway:
|
||||
picker_title: "⚡ **Priority Processing**\\n\\nJelenlegi mód: `{mode}`\\n\\nVálassz egy opciót:"
|
||||
choice_fast: "fast — Priority Processing bekapcsolva"
|
||||
choice_normal: "normal — normál feldolgozás"
|
||||
choice_auto: "auto — gyors minden kör első másodperceiben"
|
||||
choice_cold: "cold — gyors csak a munkamenet első körében"
|
||||
|
||||
footer:
|
||||
status: "📎 Futási idejű lábléc: **{state}**\nMezők: `{fields}`\nPlatform: `{platform}`"
|
||||
|
||||
@@ -137,6 +137,8 @@ gateway:
|
||||
picker_title: "⚡ **Priority Processing**\\n\\nModalità attuale: `{mode}`\\n\\nScegli un\\'opzione:"
|
||||
choice_fast: "fast — Priority Processing attivo"
|
||||
choice_normal: "normal — elaborazione standard"
|
||||
choice_auto: "auto — veloce nei primi secondi di ogni turno"
|
||||
choice_cold: "cold — veloce solo nel primo turno di una sessione"
|
||||
|
||||
footer:
|
||||
status: "📎 Footer di runtime: **{state}**\nCampi: `{fields}`\nPiattaforma: `{platform}`"
|
||||
|
||||
@@ -137,6 +137,8 @@ gateway:
|
||||
picker_title: "⚡ **Priority Processing**\\n\\n現在のモード: `{mode}`\\n\\nオプションを選択:"
|
||||
choice_fast: "fast — Priority Processing オン"
|
||||
choice_normal: "normal — 標準処理"
|
||||
choice_auto: "auto — 各ターンの最初の数秒間だけ高速"
|
||||
choice_cold: "cold — セッションの最初のターンのみ高速"
|
||||
|
||||
footer:
|
||||
status: "📎 ランタイムフッター: **{state}**\nフィールド: `{fields}`\nプラットフォーム: `{platform}`"
|
||||
|
||||
@@ -137,6 +137,8 @@ gateway:
|
||||
picker_title: "⚡ **Priority Processing**\\n\\n현재 모드: `{mode}`\\n\\n옵션을 선택하세요:"
|
||||
choice_fast: "fast — Priority Processing 켜기"
|
||||
choice_normal: "normal — 표준 처리"
|
||||
choice_auto: "auto — 매 턴의 처음 몇 초 동안 빠름"
|
||||
choice_cold: "cold — 세션의 첫 턴에만 빠름"
|
||||
|
||||
footer:
|
||||
status: "📎 런타임 푸터: **{state}**\n필드: `{fields}`\n플랫폼: `{platform}`"
|
||||
|
||||
@@ -137,6 +137,8 @@ gateway:
|
||||
picker_title: "⚡ **Priority Processing**\\n\\nModo atual: `{mode}`\\n\\nEscolha uma opção:"
|
||||
choice_fast: "fast — Priority Processing ativado"
|
||||
choice_normal: "normal — processamento padrão"
|
||||
choice_auto: "auto — rápido nos primeiros segundos de cada turno"
|
||||
choice_cold: "cold — rápido apenas no primeiro turno de uma sessão"
|
||||
|
||||
footer:
|
||||
status: "📎 Rodapé de execução: **{state}**\nCampos: `{fields}`\nPlataforma: `{platform}`"
|
||||
|
||||
@@ -137,6 +137,8 @@ gateway:
|
||||
picker_title: "⚡ **Priority Processing**\\n\\nТекущий режим: `{mode}`\\n\\nВыберите вариант:"
|
||||
choice_fast: "fast — Priority Processing включён"
|
||||
choice_normal: "normal — стандартная обработка"
|
||||
choice_auto: "auto — быстро в первые секунды каждого хода"
|
||||
choice_cold: "cold — быстро только на первом ходе сессии"
|
||||
|
||||
footer:
|
||||
status: "📎 Нижний колонтитул среды выполнения: **{state}**\nПоля: `{fields}`\nПлатформа: `{platform}`"
|
||||
|
||||
@@ -137,6 +137,8 @@ gateway:
|
||||
picker_title: "⚡ **Priority Processing**\\n\\nMevcut mod: `{mode}`\\n\\nBir seçenek seçin:"
|
||||
choice_fast: "fast — Priority Processing açık"
|
||||
choice_normal: "normal — standart işleme"
|
||||
choice_auto: "auto — her turun ilk saniyelerinde hızlı"
|
||||
choice_cold: "cold — yalnızca oturumun ilk turunda hızlı"
|
||||
|
||||
footer:
|
||||
status: "📎 Çalışma zamanı altbilgisi: **{state}**\nAlanlar: `{fields}`\nPlatform: `{platform}`"
|
||||
|
||||
@@ -137,6 +137,8 @@ gateway:
|
||||
picker_title: "⚡ **Priority Processing**\\n\\nПоточний режим: `{mode}`\\n\\nОберіть варіант:"
|
||||
choice_fast: "fast — Priority Processing увімкнено"
|
||||
choice_normal: "normal — стандартна обробка"
|
||||
choice_auto: "auto — швидко в перші секунди кожного ходу"
|
||||
choice_cold: "cold — швидко лише на першому ході сесії"
|
||||
|
||||
footer:
|
||||
status: "📎 Нижній колонтитул середовища: **{state}**\nПоля: `{fields}`\nПлатформа: `{platform}`"
|
||||
|
||||
@@ -137,6 +137,8 @@ gateway:
|
||||
picker_title: "⚡ **Priority Processing**\\n\\n目前模式:`{mode}`\\n\\n請選擇:"
|
||||
choice_fast: "fast — 開啟 Priority Processing"
|
||||
choice_normal: "normal — 標準處理"
|
||||
choice_auto: "auto — 每輪的前幾秒快速"
|
||||
choice_cold: "cold — 僅會話的第一輪快速"
|
||||
|
||||
footer:
|
||||
status: "📎 執行階段頁尾:**{state}**\n欄位:`{fields}`\n平台:`{platform}`"
|
||||
|
||||
@@ -137,6 +137,8 @@ gateway:
|
||||
picker_title: "⚡ **优先处理**\\n\\n当前模式:`{mode}`\\n\\n请选择:"
|
||||
choice_fast: "fast — 开启优先处理"
|
||||
choice_normal: "normal — 标准处理"
|
||||
choice_auto: "auto — 每轮的前几秒快速"
|
||||
choice_cold: "cold — 仅会话的第一轮快速"
|
||||
|
||||
footer:
|
||||
status: "📎 运行时页脚:**{state}**\n字段:`{fields}`\n平台:`{platform}`"
|
||||
|
||||
Reference in New Issue
Block a user