refactor(native-tools): add Relay-managed tool layer - #348
Merged
Conversation
nvddr
marked this pull request as ready for review
August 11, 2026 20:56
Collaborator
Blocker
Suggestions
Nit
Assumption: Relay is intended to instrument and modify the real provider request, not merely emit local lifecycle events. The PR documentation supports that interpretation. Focused verification: 7 tests passed, Ruff passed, and the package built successfully. Full test-project type checking could not run locally because |
Signed-off-by: Devdeep Ray <devdeepr@nvidia.com>
nvddr
force-pushed
the
agent/relay-runtime-foundation
branch
from
August 11, 2026 21:18
14f5a35 to
94b76b8
Compare
Signed-off-by: Devdeep Ray <devdeepr@nvidia.com>
Collaborator
Author
|
Addressed in caca425: Relay now receives request and response OpenAI codecs; its rewritten content and controlled headers reach the model service; empty tools are omitted; and tool-call-only null content normalizes to an empty native message. Added focused coverage for the Relay boundary and a custom AgentRunner tool. |
Signed-off-by: Devdeep Ray <devdeepr@nvidia.com>
wenxind-nvidia
approved these changes
Aug 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
xr-ai-natthe toolkit-independent native tools layerAgentRunnerseam; the bundledAgentremains a bounded default loop, while custom or future framework-backed runners stay behind a normal toolxr-ai-models, supply request/response OpenAI codecs, omit empty tools, and accept tool-call-onlycontent: nullresponsesValidation
uv run --project tests pytest tests/test_native_tools.py tests/test_models_openai_compat.py tests/test_nat_models_llm.py tests/test_functions_types.py tests/test_docs_versions.py -quvx ruff check agent-sdk/xr-ai-nat/xr_ai_nat/agent_runner.py agent-sdk/xr-ai-nat/xr_ai_nat/agents.py agent-sdk/xr-ai-models/xr_ai_models/_openai_compat.py tests/test_native_tools.py tests/test_models_openai_compat.pyuv run --project tests --with pyright pyright agent-sdk/xr-ai-nat/xr_ai_nat/agent_runner.py agent-sdk/xr-ai-nat/xr_ai_nat/agents.py agent-sdk/xr-ai-models/xr_ai_models/_openai_compat.py tests/test_native_tools.py tests/test_models_openai_compat.pynvidia-nat-*distributionuv build --wheel agent-sdk/xr-ai-natFollow-up PRs add streaming vision as a normal native tool and route voice plus background triggers through registered tools.