fix(gateway): resolve runtime provider for BOOT.md hook#14992
Conversation
|
Thanks for linking these. Yes, this PR addresses the same root cause as #5239 and overlaps with #12514, #5240, and #11069. I opened this after reproducing the failure with an Happy for maintainers to pick whichever implementation they prefer. This PR adds focused regression coverage for:
|
BOOT.md was merged in PR #3733 before the feature was ready — the built-in hook spawned a bare AIAgent() with no model/runtime kwargs, which immediately 401s on any provider with a custom endpoint. Three separate community PRs (#5240, #12514, #14992) tried to paper over it. Remove the BOOT.md hook entirely and its user-facing docs/tips. Keep the gateway/builtin_hooks/ package and the HookRegistry._register_builtin_hooks() hook-point intact as the extension surface for future always-on gateway hooks. Closes #5239. Co-authored-by: teknium1 <teknium@users.noreply.github.com>
|
Superseded by #17093 — we rolled BOOT.md back entirely rather than layering runtime-resolution fixes on top. The feature shipped in #3733 before it was ready (bare AIAgent() with no model/runtime, as you correctly identified), so pulling it is the right move for now. Thanks for the fix — if we bring BOOT.md back later, we'll do it with the runtime-resolution pattern you PR'd here. |
BOOT.md was merged in PR #3733 before the feature was ready — the built-in hook spawned a bare AIAgent() with no model/runtime kwargs, which immediately 401s on any provider with a custom endpoint. Three separate community PRs (#5240, #12514, #14992) tried to paper over it. Remove the BOOT.md hook entirely and its user-facing docs/tips. Keep the gateway/builtin_hooks/ package and the HookRegistry._register_builtin_hooks() hook-point intact as the extension surface for future always-on gateway hooks. Closes #5239. Co-authored-by: teknium1 <teknium@users.noreply.github.com>
BOOT.md was merged in PR NousResearch#3733 before the feature was ready — the built-in hook spawned a bare AIAgent() with no model/runtime kwargs, which immediately 401s on any provider with a custom endpoint. Three separate community PRs (NousResearch#5240, NousResearch#12514, NousResearch#14992) tried to paper over it. Remove the BOOT.md hook entirely and its user-facing docs/tips. Keep the gateway/builtin_hooks/ package and the HookRegistry._register_builtin_hooks() hook-point intact as the extension surface for future always-on gateway hooks. Closes NousResearch#5239. Co-authored-by: teknium1 <teknium@users.noreply.github.com>
BOOT.md was merged in PR NousResearch#3733 before the feature was ready — the built-in hook spawned a bare AIAgent() with no model/runtime kwargs, which immediately 401s on any provider with a custom endpoint. Three separate community PRs (NousResearch#5240, NousResearch#12514, NousResearch#14992) tried to paper over it. Remove the BOOT.md hook entirely and its user-facing docs/tips. Keep the gateway/builtin_hooks/ package and the HookRegistry._register_builtin_hooks() hook-point intact as the extension surface for future always-on gateway hooks. Closes NousResearch#5239. Co-authored-by: teknium1 <teknium@users.noreply.github.com>
BOOT.md was merged in PR NousResearch#3733 before the feature was ready — the built-in hook spawned a bare AIAgent() with no model/runtime kwargs, which immediately 401s on any provider with a custom endpoint. Three separate community PRs (NousResearch#5240, NousResearch#12514, NousResearch#14992) tried to paper over it. Remove the BOOT.md hook entirely and its user-facing docs/tips. Keep the gateway/builtin_hooks/ package and the HookRegistry._register_builtin_hooks() hook-point intact as the extension surface for future always-on gateway hooks. Closes NousResearch#5239. Co-authored-by: teknium1 <teknium@users.noreply.github.com>
BOOT.md was merged in PR NousResearch#3733 before the feature was ready — the built-in hook spawned a bare AIAgent() with no model/runtime kwargs, which immediately 401s on any provider with a custom endpoint. Three separate community PRs (NousResearch#5240, NousResearch#12514, NousResearch#14992) tried to paper over it. Remove the BOOT.md hook entirely and its user-facing docs/tips. Keep the gateway/builtin_hooks/ package and the HookRegistry._register_builtin_hooks() hook-point intact as the extension surface for future always-on gateway hooks. Closes NousResearch#5239. Co-authored-by: teknium1 <teknium@users.noreply.github.com>
BOOT.md was merged in PR NousResearch#3733 before the feature was ready — the built-in hook spawned a bare AIAgent() with no model/runtime kwargs, which immediately 401s on any provider with a custom endpoint. Three separate community PRs (NousResearch#5240, NousResearch#12514, NousResearch#14992) tried to paper over it. Remove the BOOT.md hook entirely and its user-facing docs/tips. Keep the gateway/builtin_hooks/ package and the HookRegistry._register_builtin_hooks() hook-point intact as the extension surface for future always-on gateway hooks. Closes NousResearch#5239. Co-authored-by: teknium1 <teknium@users.noreply.github.com>
BOOT.md was merged in PR NousResearch#3733 before the feature was ready — the built-in hook spawned a bare AIAgent() with no model/runtime kwargs, which immediately 401s on any provider with a custom endpoint. Three separate community PRs (NousResearch#5240, NousResearch#12514, NousResearch#14992) tried to paper over it. Remove the BOOT.md hook entirely and its user-facing docs/tips. Keep the gateway/builtin_hooks/ package and the HookRegistry._register_builtin_hooks() hook-point intact as the extension surface for future always-on gateway hooks. Closes NousResearch#5239. Co-authored-by: teknium1 <teknium@users.noreply.github.com>
Summary
AIAgentAIAgentconstructor kwargsWhy
The built-in BOOT.md hook runs outside normal gateway message handling. Without explicit runtime resolution, the one-shot boot agent can miss the gateway's configured provider/model and fail before it can call tools such as
send_message.Test Plan
python -m pytest tests/gateway/test_boot_md.py -qpython -m pytest tests/gateway/test_boot_md.py tests/gateway/test_hooks.py -q