teknium1
0e5809566f
feat(plugins): fire pre/post_auxiliary_call events on every auxiliary LLM call ( #79733 )
...
Auxiliary LLM calls (titling, compression, MoA advisors/aggregator, vision,
approval, ...) never reached any plugin hook: hook-based observability and
cost plugins were structurally blind to them. Teknium's ruling on #79733 :
NEW events rather than reusing the turn-scoped pre/post_api_request pair,
so existing subscribers keep their per-turn semantics.
- agent/auxiliary_hooks.py (new sibling): builds the pre_api_request /
post_api_request payload shape plus `aux_task`, `api_request_id`
(`aux-...`, shared by every attempt of one logical call), `retry_count`,
`streaming`, parent-turn `session_id`/`task_id`/`turn_id` when a main
turn is in flight; fail-open (a raising/hung subscriber is logged and
the aux task proceeds); post carries `error`/`error_type` on failure.
- agent/auxiliary_client.py: the three relay funnels every physical
attempt shares (_relay_sync_completion / _relay_async_completion /
_relay_sync_stream) run under the hook pair — retries and fallbacks
included. Main-loop *_api_request events do not fire for aux calls.
- Catalogue: VALID_HOOKS, bounded-timeout hook set, `hermes hooks test`
sample payloads, hooks.md / plugins index / observer-hooks / plugins.md
tables, agent + plugins AGENTS.md.
- tests/agent/test_auxiliary_hooks.py: 2 invariants (pair fires with
aux_task and no api_request events; raising subscriber never breaks
the call). First is red on origin/main.
Supersedes #32416 (@zrmnelson), #68060 (@JonZal), #77518 (@hsy5571615),
#79826 (@webtecnica) — their relay-boundary placement, usage
normalisation and fail-open policy shaped this implementation.
Co-authored-by: zrmnelson <zacharynelson1@gmail.com >
Co-authored-by: Jonas Zalys <jonas@tryholo.ai >
Co-authored-by: saitsuki <nukuom976228@gmail.com >
Co-authored-by: webtecnica <webtecnica@gmail.com >
2026-09-22 01:19:12 -07:00
..
2026-09-20 18:54:24 -07:00
2026-09-20 10:11:40 -07:00
2026-09-21 15:09:02 -07:00
2026-09-20 00:35:04 -07:00
2026-09-19 09:40:23 -07:00
2026-09-19 10:13:20 -07:00
2026-09-19 09:57:21 -07:00
2026-09-19 09:56:12 -07:00
2026-09-19 11:25:23 +05:30
2026-09-18 20:55:24 -07:00
2026-09-19 11:25:23 +05:30
2026-09-21 09:55:40 -07:00
2026-09-20 12:49:40 -07:00
2026-09-22 00:58:23 -07:00
2026-09-19 00:55:07 -07:00
2026-09-20 00:15:32 -07:00
2026-09-20 00:15:32 -07:00
2026-09-19 12:30:31 -07:00
2026-09-18 10:13:32 -07:00
2026-09-19 09:33:37 -07:00
2026-09-18 09:46:03 -07:00
2026-09-20 13:22:30 -07:00
2026-09-20 20:42:17 -07:00
2026-09-22 01:19:12 -07:00
2026-09-19 23:43:32 -07:00
2026-09-19 09:38:39 -07:00
2026-09-19 11:10:58 -07:00
2026-09-19 20:45:06 -07:00
2026-09-19 02:37:36 -07:00
2026-09-20 12:09:47 -07:00
2026-09-19 12:30:32 -07:00
2026-09-18 19:18:57 -07:00
2026-09-20 12:09:47 -07:00
2026-09-17 18:36:10 -07:00
2026-09-20 16:33:18 +05:30
2026-09-20 17:58:45 +05:30
2026-09-19 09:42:18 -07:00
2026-09-19 09:43:20 -07:00
2026-09-19 01:23:16 -07:00
2026-09-19 12:27:01 -07:00
2026-09-19 09:28:13 -07:00
2026-09-19 10:00:03 -07:00
2026-09-18 09:56:28 -07:00
2026-09-19 00:04:42 -07:00
2026-09-19 09:37:23 -07:00
2026-09-19 01:15:11 -07:00
2026-09-19 12:21:39 -07:00
2026-09-19 10:52:11 -07:00
2026-09-19 20:44:24 -07:00
2026-09-19 01:23:16 -07:00
2026-09-19 10:22:33 -07:00
2026-09-18 23:41:22 -07:00
2026-09-19 00:57:47 -07:00
2026-09-19 09:32:00 -07:00
2026-09-19 10:47:00 -07:00
2026-09-18 10:36:11 -07:00
2026-09-20 15:50:49 -07:00
2026-09-20 18:53:10 -07:00
2026-09-20 15:27:11 -07:00
2026-09-18 09:49:14 -07:00
2026-09-20 18:24:07 -07:00
2026-09-21 01:04:16 -07:00
2026-09-20 11:53:57 +05:30
2026-09-18 10:36:11 -07:00
2026-09-22 13:38:25 +05:30
2026-09-18 09:52:36 -07:00
2026-09-18 19:18:23 -07:00
2026-09-22 13:40:13 +05:30
2026-09-21 23:38:16 -07:00
2026-09-19 10:28:34 -07:00
2026-09-20 19:45:30 -07:00
2026-09-18 09:33:38 -07:00
2026-09-18 20:57:07 -07:00
2026-09-21 09:55:40 -07:00
2026-09-19 20:45:06 -07:00
2026-09-21 09:55:40 -07:00
2026-09-19 09:40:56 -07:00
2026-09-18 10:17:59 -07:00
2026-09-20 13:22:30 -07:00
2026-09-19 10:33:08 -07:00
2026-09-19 22:40:16 -07:00
2026-09-20 14:02:17 +05:30
2026-09-20 14:02:17 +05:30
2026-09-19 09:20:54 -07:00
2026-09-19 03:15:10 -07:00
2026-09-19 09:39:50 -07:00
2026-09-19 12:12:04 +05:30
2026-09-19 09:37:23 -07:00
2026-09-19 16:20:29 +05:30
2026-09-19 09:57:21 -07:00
2026-09-20 15:28:21 -07:00
2026-09-19 01:34:01 -07:00
2026-09-20 12:36:34 +05:30
2026-09-19 09:49:39 -07:00
2026-09-18 19:18:57 -07:00
2026-09-19 09:27:08 -07:00
2026-09-19 09:49:39 -07:00
2026-09-20 10:17:39 -07:00
2026-09-18 10:08:58 -07:00
2026-09-21 21:34:44 +05:30
2026-09-20 10:50:27 -07:00
2026-09-20 10:50:27 -07:00
2026-09-20 18:43:11 -07:00
2026-09-21 21:43:51 +05:30
2026-09-21 21:43:51 +05:30
2026-09-19 20:56:31 -07:00
2026-09-19 00:34:41 -07:00
2026-09-19 09:28:45 -07:00
2026-09-18 09:21:42 -07:00
2026-09-22 13:40:13 +05:30
2026-09-19 02:37:36 -07:00
2026-09-21 19:31:36 -04:00
2026-09-19 00:55:05 +05:30
2026-09-19 00:59:32 +05:30
2026-09-20 15:26:34 -07:00
2026-09-20 15:26:34 -07:00
2026-09-19 10:25:30 -07:00
2026-09-18 20:56:35 -07:00
2026-09-20 15:51:19 -07:00
2026-09-20 15:51:19 -07:00
2026-09-19 10:11:01 -07:00
2026-09-19 12:17:05 -07:00
2026-09-18 15:40:37 +05:30
2026-09-19 21:08:09 -07:00
2026-09-19 00:05:47 -07:00
2026-09-21 13:14:22 -07:00
2026-09-19 09:47:00 -07:00
2026-09-19 12:30:31 -07:00
2026-09-19 09:23:54 -07:00
2026-09-19 09:53:48 -07:00
2026-09-19 10:21:28 -07:00
2026-09-19 09:21:18 -07:00
2026-09-19 10:06:00 -07:00
2026-09-20 18:43:11 -07:00
2026-09-19 11:22:29 -07:00
2026-09-20 12:52:07 -07:00
2026-09-18 10:22:14 -07:00
2026-09-21 23:38:16 -07:00
2026-09-18 10:35:37 -07:00
2026-09-19 09:34:09 -07:00
2026-09-18 13:58:52 -07:00
2026-09-18 10:36:11 -07:00
2026-09-18 10:36:11 -07:00
2026-09-18 09:49:14 -07:00
2026-09-21 15:09:02 -07:00
2026-09-18 10:22:47 -07:00
2026-09-21 01:04:37 -07:00
2026-09-21 15:07:39 -07:00
2026-09-20 14:29:39 -07:00
2026-09-20 14:29:39 -07:00
2026-09-18 10:22:14 -07:00
2026-09-20 12:17:52 +05:30
2026-09-20 17:00:43 -07:00
2026-09-19 01:24:58 -07:00
2026-09-19 01:19:57 -07:00
2026-09-19 10:20:55 -07:00
2026-09-19 23:49:03 -07:00
2026-09-18 09:58:12 -07:00
2026-09-19 23:38:49 -07:00
2026-09-19 23:42:20 -07:00
2026-09-18 10:22:14 -07:00
2026-09-19 23:40:01 -07:00
2026-09-19 16:21:40 +05:30
2026-09-19 10:03:43 -07:00
2026-09-19 12:21:39 -07:00
2026-09-21 23:56:25 -07:00
2026-09-18 10:22:14 -07:00
2026-09-19 10:38:30 -07:00
2026-09-19 01:02:31 -07:00
2026-09-21 23:47:51 -07:00
2026-09-20 15:50:26 -07:00
2026-09-20 15:50:26 -07:00
2026-09-19 21:12:46 +05:30
2026-09-19 10:08:14 -07:00
2026-09-20 16:20:52 -07:00
2026-09-20 18:24:07 -07:00
2026-09-18 13:01:12 -04:00
2026-09-19 09:50:41 -07:00
2026-09-20 14:29:39 -07:00
2026-09-19 23:40:01 -07:00
2026-09-19 10:41:08 +05:30
2026-09-20 10:51:03 -07:00
2026-09-18 09:49:14 -07:00
2026-09-20 16:31:10 -07:00
2026-09-20 14:09:57 -07:00
2026-09-20 15:26:34 -07:00
2026-09-18 10:38:08 -07:00
2026-09-18 10:03:04 -07:00
2026-09-20 18:09:19 +05:30
2026-09-21 23:56:25 -07:00
2026-09-20 12:52:07 -07:00
2026-09-21 21:43:51 +05:30
2026-09-20 14:09:57 -07:00
2026-09-19 09:44:25 -07:00
2026-09-19 12:38:55 -07:00
2026-09-19 12:38:55 -07:00
2026-09-21 21:33:44 +05:30
2026-09-20 16:03:38 -07:00
2026-09-19 01:19:22 -07:00
2026-09-20 10:21:52 -07:00
2026-09-20 10:23:04 -07:00
2026-09-19 09:53:48 -07:00