feat(plugin): add Future-returning typed LLM intercepts - #732
Draft
afourniernv wants to merge 33 commits into
Draft
feat(plugin): add Future-returning typed LLM intercepts#732afourniernv wants to merge 33 commits into
afourniernv wants to merge 33 commits into
Conversation
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Alex Fournier <afournier@nvidia.com>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
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.
Overview
Add Future-returning typed registration methods for native API v2 buffered and streaming LLM execution intercepts.
This is the 0.8-oriented Future lane discussed alongside #730. It is intentionally stacked on #594 and reuses that PR's cooperative host polling, cancellation, panic isolation, continuation ownership, bounded stream backpressure, and unload safety. It does not replace the completion-based 0.7 option in #730.
Details
PluginContext::register_async_llm_execution_intercept, whose callback returns aFuture<Output = Result<Json>>.PluginContext::register_async_llm_stream_execution_intercept, whose callback returns aFuture<Output = Result<LlmStreamExecutionOutcomeV2>>.register_async_llm_*_v2methods unchanged. This PR is additive and does not change the native ABI.The two lanes have different ownership:
Validation:
cargo fmt --allcargo clippy --workspace --all-targets -- -D warningsjust test-rustcargo test -p nemo-relay-pluginjust docs(passes; authenticated Fern redirect check skipped becauseFERN_TOKENis not configured)uv run pre-commit run --all-filesWhere should the reviewer start?
Start with
crates/plugin/src/native_v2.rs. The main design question is whether these additive Future-returning names are the preferred safe SDK surface over exposing completion ownership directly in #730. The implementation itself is a thin adapter over #594.This draft is stacked on #594, so GitHub will show that PR's commits until it merges or this branch is rebased onto
main.Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)