Skip to content

feat(codec): add missing optional AnnotatedLlmRequest/Response fields#76

Merged
rapids-bot[bot] merged 18 commits into
NVIDIA:mainfrom
afourniernv:feat/codec-ir-extraction
May 13, 2026
Merged

feat(codec): add missing optional AnnotatedLlmRequest/Response fields#76
rapids-bot[bot] merged 18 commits into
NVIDIA:mainfrom
afourniernv:feat/codec-ir-extraction

Conversation

@afourniernv
Copy link
Copy Markdown
Contributor

@afourniernv afourniernv commented May 11, 2026

Summary

This PR expands normalized codec extraction around AnnotatedLlmRequest and AnnotatedLlmResponse for:

  • OpenAI Chat Completions (/v1/chat/completions)
  • OpenAI Responses (/v1/responses)
  • Anthropic Messages (/v1/messages)
  • Hybrid payload variants observed in inference gateways/provider bridges (vLLM, LiteLLM, SGLang patterns)

The goal is to extract more meaningful normalized state while preserving unmodeled provider-specific fields losslessly via extra.

Additive Request IR State (AnnotatedLlmRequest)

Added normalized optional fields:

  • store: Option<bool>
  • previous_response_id: Option<String>
  • truncation: Option<Json>
  • reasoning: Option<Json>
  • include: Option<Json>
  • user: Option<String>
  • metadata: Option<Json>
  • service_tier: Option<String>
  • parallel_tool_calls: Option<bool>
  • max_output_tokens: Option<u64>
  • max_tool_calls: Option<u64>
  • top_logprobs: Option<u64>
  • stream: Option<bool>

Multimodal request content expansion:

  • ContentPart::ImageUrl { image_url: OpenAiImageUrl }
  • OpenAiImageUrl { url, detail }

Additive Response IR State (ApiSpecificResponse)

OpenAI Responses variant expanded with:

  • previous_response_id
  • store
  • service_tier
  • truncation
  • reasoning
  • input_tokens_details
  • output_tokens_details

Anthropic Messages variant expanded with:

  • service_tier
  • container
  • content_blocks

OpenAI Responses request-side hardening

  • Added strict-first decode behavior for heterogeneous input arrays
  • Removed silent lossy fallback behavior
  • Preserves unparsed mixed input items in extra (_openai_responses_unparsed_input_items) for round-trip safety
  • Handles Anthropic-style tool hint combinations when present in mixed gateway payloads

Anthropic request-side updates

  • Expanded extraction for metadata, service-tier, and tool parallelism semantics
  • Added explicit tool_choice.type == "none" parity in decode/encode
  • Preserves bridge/runtime extension fields in extra

Hybrid payload coverage added

Added fixture/test coverage for mixed/provider patterns:

  • vLLM-style Anthropic and OpenAI Responses hybrids
  • LiteLLM hybrid patterns for Anthropic and Responses
  • SGLang Responses extension payloads

Consumer blast-radius updates

Because request IR added new fields and a new ContentPart variant, downstream consumers were updated:

  • crates/adaptive
  • crates/ffi tests
  • crates/wasm tests
  • crates/python

Scope note

This PR intentionally avoids a larger architectural shift. It keeps the current AnnotatedLlmRequest / AnnotatedLlmResponse IR approach and expands extraction additively.

Validation performed

  • uv run pre-commit run --all-files
  • cargo test -p nemo-flow-adaptive
  • cargo test -p nemo-flow-ffi
  • cargo test -p nemo-flow-wasm
  • cargo test -p nemo-flow-python
  • cargo test -p nemo-flow codec::
  • Live OpenAI Responses smoke test against the real API
  • Live OpenAI Responses mixed tool-follow-up input round-trip test against the real API
  • Live Anthropic Messages smoke test against the real API

Live validation notes

Live provider validation covered:

  • OpenAI Responses request/response decode and encode behavior
  • OpenAI Responses usage detail preservation for input_tokens_details.cached_tokens and output_tokens_details.reasoning_tokens
  • OpenAI mixed input array round-trip behavior using a real tool-calling follow-up request
  • Anthropic Messages response preservation for type and stop_reason

Remaining limitations

  • This is still not exhaustive gateway conformance testing for every provider bridge variant
  • Hybrid gateway behavior is still primarily fixture-backed rather than live-provider-backed

Summary by CodeRabbit

Release Notes

  • New Features

    • Added support for multimodal message content including images alongside text.
    • Introduced parallel tool execution control to optimize tool-calling behavior.
    • Expanded request and response metadata fields for improved API compatibility (store, user, metadata, service tier, reasoning controls, and token limits).
  • Bug Fixes

    • Improved text extraction from multimodal content to correctly handle image URLs.
  • Tests

    • Updated test fixtures to support expanded request/response schema.

Review Change Stack

@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented May 11, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 11, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

This PR extends the codec request/response schema with 13 new optional OpenAI/Anthropic-specific fields, adds multimodal image-URL content support, refactors text extraction to safely ignore non-text parts, and updates three API codec implementations to decode/encode these fields. Tests and language bindings are comprehensively updated.

Changes

Multimodal + Modeled Fields Roundtrip

Layer / File(s) Summary
Request/response schema extension and multimodal support
crates/core/src/codec/request.rs, crates/core/src/codec/response.rs
AnnotatedLlmRequest gains 13 new optional fields; ApiSpecificResponse variants extended; ContentPart::ImageUrl variant added with OpenAiImageUrl; system_prompt, last_user_message, response_text refactored to safely extract text-only from parts.
Adaptive/core text extraction for multimodal handling
crates/adaptive/src/acg/ir_builder.rs, crates/adaptive/src/acg_profile.rs, crates/core/src/codec/anthropic.rs
Text extraction updated to filter ContentPart::Text only; image URLs become deterministic placeholders in fingerprinting or are explicitly ignored in system prompts.
Anthropic codec decode/encode with tool-choice and metadata
crates/core/src/codec/anthropic.rs
Response decoding captures object_type, service_tier, container; request decoding parses tool_choice (including none) and extracts parallel_tool_calls from disable_parallel_tool_use; encoding overlays metadata/service_tier and encodes None as {type:none} with parallel-tool hint support.
OpenAI Chat codec decode/encode with typed fields
crates/core/src/codec/openai_chat.rs
Seven new fields (store, user, metadata, service_tier, parallel_tool_calls, top_logprobs, stream) elevated from extra to modeled keys; decode populates request fields; encode writes them to outgoing JSON.
OpenAI Responses codec with token normalization and input preservation
crates/core/src/codec/openai_responses.rs
Token-details normalized to JSON with flattened extra; input array deserialization strict-first with fallback to preserve original JSON; tool-choice and parallel-tool helpers added; encode preserves raw input when available and overlays modeled fields.
Adaptive module test updates
crates/adaptive/tests/integration/*.rs, crates/adaptive/tests/unit/*/
All test fixtures updated with new optional fields; new image-fingerprinting test validates different URLs yield different fingerprints.
Core codec unit and integration tests
crates/core/tests/integration/codec_tests.rs, crates/core/tests/unit/codec/request_tests.rs, crates/core/tests/unit/codec/response_tests.rs, crates/core/tests/unit/shared_tests.rs
Fixtures updated with expanded schema; stream field behavior verified; JSON round-trip tests for modeled fields.
Anthropic codec unit tests
crates/core/tests/unit/codec/anthropic_tests.rs
Response-decode tests verify modeled field capture; request-decode tests added for service_tier, tool_choice none, text-only system extraction, LiteLLM reasoning, cache-control; encode test validates payload writing; assertion updated from auto to none.
OpenAI Chat codec unit tests
crates/core/tests/unit/codec/openai_chat_tests.rs
Imports expanded for multimodal types; request-decode tests verify typed fields extracted; new test validates multimodal content parts assembled correctly; encode tests verify typed controls and multimodal serialization.
OpenAI Responses codec unit tests
crates/core/tests/unit/codec/openai_responses_tests.rs
Response-decode test validates token-details and metadata capture; request-decode tests added for typed controls, unparsed input preservation, Anthropic-compatible tool_choice, LiteLLM reasoning, SGLang extensions; encode tests verify modeled field serialization.
FFI and WASM test updates
crates/ffi/tests/integration/*.rs, crates/ffi/tests/unit/*.rs, crates/wasm/tests/coverage/callable_tests.rs
Fixtures updated with new optional fields; no logic changes to codec or interception behavior.
Python bindings
crates/python/src/py_types/codecs.rs, crates/python/tests/coverage/py_types_coverage_tests.rs
PyAnnotatedLLMRequest extended with 13 new getter/setter pairs; optional_json helpers added for Any-typed fields; coverage tests exercise new fields in defaults, update, and clear paths.

🎯 4 (Complex) | ⏱️ ~60 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The PR title follows Conventional Commits format with proper type(scope)[!]: summary structure, uses lowercase, stays under 72 characters (69), and is imperative.
Description check ✅ Passed The PR description comprehensively covers the changes, rationale, scope, validation performed, and limitations. While it deviates from the template structure by providing a custom narrative format, the content is well-organized and contains all essential information required for reviewer understanding.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added size:XL PR is extra large lang:rust PR changes/introduces Rust code labels May 11, 2026
@afourniernv afourniernv force-pushed the feat/codec-ir-extraction branch from 1844af6 to eeeaa13 Compare May 13, 2026 01:03
@afourniernv afourniernv marked this pull request as ready for review May 13, 2026 01:10
@afourniernv afourniernv requested a review from a team as a code owner May 13, 2026 01:10
@afourniernv afourniernv force-pushed the feat/codec-ir-extraction branch from eeeaa13 to c9ea854 Compare May 13, 2026 01:11
@willkill07
Copy link
Copy Markdown
Member

/ok to test c9ea854

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
crates/ffi/tests/unit/callable_tests.rs (1)

326-347: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Strengthen this test to assert round-trip on new optional fields

AnnotatedLlmRequest now includes many new optional fields, but this test still only verifies model and extra. Set a few new fields to non-None and assert they survive the intercept path to catch FFI regression on the expanded public surface.

Suggested test hardening
     let annotated = nemo_flow::codec::request::AnnotatedLlmRequest {
         messages: vec![],
         model: Some("test-model".into()),
         params: None,
         tools: None,
         tool_choice: None,
-        store: None,
-        previous_response_id: None,
+        store: Some(true),
+        previous_response_id: Some("resp_prev_1".into()),
         truncation: None,
         reasoning: None,
         include: None,
-        user: None,
+        user: Some("user-123".into()),
         metadata: None,
         service_tier: None,
         parallel_tool_calls: None,
         max_output_tokens: None,
         max_tool_calls: None,
         top_logprobs: None,
-        stream: None,
+        stream: Some(true),
         extra: serde_json::Map::from_iter([("annotated".into(), json!(true))]),
     };
@@
     assert_eq!(annotated_out.model.as_deref(), Some("test-model"));
+    assert_eq!(annotated_out.store, Some(true));
+    assert_eq!(annotated_out.previous_response_id.as_deref(), Some("resp_prev_1"));
+    assert_eq!(annotated_out.user.as_deref(), Some("user-123"));
+    assert_eq!(annotated_out.stream, Some(true));
     assert_eq!(annotated_out.extra.get("annotated"), Some(&json!(true)));

As per coding guidelines, “Treat binding changes as public API changes. Check for parity with the other language bindings...” and “Tests should cover the behavior promised by the changed API surface...”.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/ffi/tests/unit/callable_tests.rs` around lines 326 - 347, The test
currently only asserts AnnotatedLlmRequest.model and extra survive
request_intercept; update the test that builds the annotated variable (the
AnnotatedLlmRequest instance used with request_intercept and make_request) to
set several optional fields to non-None values (e.g., store,
previous_response_id, user, metadata, service_tier, max_output_tokens or
parallel_tool_calls) and then add assertions on annotated_out (the deserialized
AnnotatedLlmRequest returned by request_intercept) to verify those fields
round-trip unchanged; locate the annotated variable and the
request_intercept("llm", make_request(), Some(annotated)) call and add matching
assert_eq! checks for each newly populated optional field.
crates/core/src/codec/openai_chat.rs (1)

260-289: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Prevent lossy decode when modeled keys have unexpected JSON types.

extra currently drops all modeled keys unconditionally, even when typed extraction fails (as_bool/as_str returns None). That loses original payload data on decode→encode round-trips (e.g., hybrid gateways emitting non-canonical types).

💡 Proposed fix sketch
-        let extra: serde_json::Map<String, Json> = obj
-            .iter()
-            .filter(|(k, _)| !MODELED_REQUEST_KEYS.contains(&k.as_str()))
+        let store = obj.get("store").and_then(|v| v.as_bool());
+        let user = obj.get("user").and_then(|v| v.as_str()).map(String::from);
+        let service_tier = obj.get("service_tier").and_then(|v| v.as_str()).map(String::from);
+        let parallel_tool_calls = obj.get("parallel_tool_calls").and_then(|v| v.as_bool());
+        let top_logprobs = obj.get("top_logprobs").and_then(|v| v.as_u64());
+        let stream = obj.get("stream").and_then(|v| v.as_bool());
+
+        let extra: serde_json::Map<String, Json> = obj
+            .iter()
+            .filter(|(k, v)| match k.as_str() {
+                "store" => store.is_none() && !v.is_null(),
+                "user" => user.is_none() && !v.is_null(),
+                "service_tier" => service_tier.is_none() && !v.is_null(),
+                "parallel_tool_calls" => parallel_tool_calls.is_none() && !v.is_null(),
+                "top_logprobs" => top_logprobs.is_none() && !v.is_null(),
+                "stream" => stream.is_none() && !v.is_null(),
+                _ => !MODELED_REQUEST_KEYS.contains(&k.as_str()),
+            })
             .map(|(k, v)| (k.clone(), v.clone()))
             .collect();
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/core/src/codec/openai_chat.rs` around lines 260 - 289, The current
extra map unconditionally omits all MODELED_REQUEST_KEYS causing loss when typed
extractions fail; modify decoding to only treat a modeled key as consumed when
its typed extraction succeeds: compute each field (e.g., store via
obj.get("store").and_then(|v| v.as_bool()), user via
obj.get("user").and_then(|v| v.as_str()), service_tier, parallel_tool_calls,
top_logprobs, stream, etc.) and add that key to a consumed_keys set only if the
extraction returns Some(...); then build extra by filtering out keys present in
consumed_keys instead of MODELED_REQUEST_KEYS. Update the code paths around
MODELED_REQUEST_KEYS, extra, and the AnnotatedLlmRequest field initializations
to use consumed_keys when collecting extra so original unparsed values are
preserved for round-trip encode/decode.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@crates/adaptive/src/acg_profile.rs`:
- Around line 190-193: The current filter_map closure drops
ContentPart::ImageUrl, losing multimodal signal; change the closure in the
fingerprint extraction pipeline (the code handling ContentPart::Text /
ContentPart::ImageUrl) to return a stable non-PII marker for images instead of
None — e.g., map ImageUrl { url } to a deterministic hashed marker like
format!("image:{hex_sha256(url)}") (or similar digest) so image-only or
text+image combinations produce distinct fingerprints; ensure the mapped value
type matches the rest of the pipeline (use owned String if needed) and implement
hashing using a deterministic digest function referenced from the same module.

In `@crates/core/src/codec/openai_responses.rs`:
- Around line 304-315: The fallback match that decodes object-form tool choices
currently handles "auto", "any", and "tool" but ignores the Anthropic-style
"none", causing those payloads to decode to None instead of ToolChoice::None;
update the matcher in openai_responses.rs (the match that returns
Some(ToolChoice::Auto/Required/Specific(...))) to add a branch for Some("none")
=> Some(ToolChoice::None), ensuring ToolChoice::None is returned for explicit
no-tools intents (involving the ToolChoice, ToolChoiceFunction, and
ToolChoiceFunctionName types).

In `@crates/python/src/py_types/codecs.rs`:
- Around line 110-122: The Python wrapper PyAnnotatedLLMRequest currently embeds
an inner AnnotatedLlmRequest with new fields (store, previous_response_id,
truncation, reasoning, include, user, metadata, service_tier,
parallel_tool_calls, max_output_tokens, max_tool_calls, top_logprobs, stream)
but does not expose constructor args or property accessors for them; update
PyAnnotatedLLMRequest to accept these fields in its constructor and add
Python-visible getters and setters that read/write inner.<field> for each listed
symbol (or, if intentional, implement maintaining parity by exposing them via
the existing extra mapping), and add unit tests that construct
PyAnnotatedLLMRequest with these fields and assert round-trip read/write through
the properties. Ensure naming and semantics match other bindings and
async/stream conventions.

---

Outside diff comments:
In `@crates/core/src/codec/openai_chat.rs`:
- Around line 260-289: The current extra map unconditionally omits all
MODELED_REQUEST_KEYS causing loss when typed extractions fail; modify decoding
to only treat a modeled key as consumed when its typed extraction succeeds:
compute each field (e.g., store via obj.get("store").and_then(|v| v.as_bool()),
user via obj.get("user").and_then(|v| v.as_str()), service_tier,
parallel_tool_calls, top_logprobs, stream, etc.) and add that key to a
consumed_keys set only if the extraction returns Some(...); then build extra by
filtering out keys present in consumed_keys instead of MODELED_REQUEST_KEYS.
Update the code paths around MODELED_REQUEST_KEYS, extra, and the
AnnotatedLlmRequest field initializations to use consumed_keys when collecting
extra so original unparsed values are preserved for round-trip encode/decode.

In `@crates/ffi/tests/unit/callable_tests.rs`:
- Around line 326-347: The test currently only asserts AnnotatedLlmRequest.model
and extra survive request_intercept; update the test that builds the annotated
variable (the AnnotatedLlmRequest instance used with request_intercept and
make_request) to set several optional fields to non-None values (e.g., store,
previous_response_id, user, metadata, service_tier, max_output_tokens or
parallel_tool_calls) and then add assertions on annotated_out (the deserialized
AnnotatedLlmRequest returned by request_intercept) to verify those fields
round-trip unchanged; locate the annotated variable and the
request_intercept("llm", make_request(), Some(annotated)) call and add matching
assert_eq! checks for each newly populated optional field.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 682b053a-4e78-4202-b141-f2d24ebae396

📥 Commits

Reviewing files that changed from the base of the PR and between 43db71b and c9ea854.

📒 Files selected for processing (40)
  • crates/adaptive/src/acg/ir_builder.rs
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/integration/acg_module_surface_tests.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
  • crates/adaptive/tests/unit/acg/ir_builder_tests.rs
  • crates/adaptive/tests/unit/acg_component_tests.rs
  • crates/adaptive/tests/unit/acg_learner_tests.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/adaptive/tests/unit/adaptive_hints_intercept_tests.rs
  • crates/adaptive/tests/unit/cache_diagnostics_tests.rs
  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/src/codec/openai_chat.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/core/src/codec/request.rs
  • crates/core/src/codec/response.rs
  • crates/core/tests/fixtures/codec/anthropic/litellm_cache_control_blocks.json
  • crates/core/tests/fixtures/codec/anthropic/litellm_thinking_output_config_reasoning_effort.json
  • crates/core/tests/fixtures/codec/anthropic/vllm_system_block_with_non_text.json
  • crates/core/tests/fixtures/codec/anthropic/vllm_tool_choice_none_with_extensions.json
  • crates/core/tests/fixtures/codec/openai_responses/anthropic_tool_choice_hint.json
  • crates/core/tests/fixtures/codec/openai_responses/litellm_reasoning_input_item.json
  • crates/core/tests/fixtures/codec/openai_responses/mixed_input_with_function_call_output.json
  • crates/core/tests/fixtures/codec/openai_responses/sglang_responses_request_with_extensions.json
  • crates/core/tests/fixtures/codec/openai_responses/strict_messages_array.json
  • crates/core/tests/integration/codec_tests.rs
  • crates/core/tests/integration/pipeline_tests.rs
  • crates/core/tests/unit/codec/anthropic_tests.rs
  • crates/core/tests/unit/codec/openai_chat_tests.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
  • crates/core/tests/unit/codec/request_tests.rs
  • crates/core/tests/unit/codec/response_tests.rs
  • crates/core/tests/unit/shared_tests.rs
  • crates/ffi/tests/integration/callable_extra_tests.rs
  • crates/ffi/tests/unit/callable_tests.rs
  • crates/ffi/tests/unit/types_tests.rs
  • crates/python/src/py_types/codecs.rs
  • crates/python/tests/coverage/py_types_coverage_tests.rs
  • crates/wasm/tests/coverage/callable_tests.rs
📜 Review details
🧰 Additional context used
📓 Path-based instructions (22)
crates/{core,adaptive}/**

📄 CodeRabbit inference engine (.agents/skills/prepare-pr/SKILL.md)

Changes to crates/core or crates/adaptive must run the full language matrix

Files:

  • crates/core/tests/fixtures/codec/openai_responses/anthropic_tool_choice_hint.json
  • crates/core/tests/fixtures/codec/anthropic/vllm_tool_choice_none_with_extensions.json
  • crates/core/tests/fixtures/codec/anthropic/vllm_system_block_with_non_text.json
  • crates/core/tests/fixtures/codec/openai_responses/strict_messages_array.json
  • crates/adaptive/tests/unit/cache_diagnostics_tests.rs
  • crates/core/tests/fixtures/codec/anthropic/litellm_cache_control_blocks.json
  • crates/adaptive/tests/unit/adaptive_hints_intercept_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
  • crates/core/tests/fixtures/codec/anthropic/litellm_thinking_output_config_reasoning_effort.json
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/core/tests/fixtures/codec/openai_responses/sglang_responses_request_with_extensions.json
  • crates/adaptive/tests/unit/acg_learner_tests.rs
  • crates/adaptive/tests/unit/acg_component_tests.rs
  • crates/adaptive/tests/integration/acg_module_surface_tests.rs
  • crates/adaptive/tests/unit/acg/ir_builder_tests.rs
  • crates/adaptive/src/acg/ir_builder.rs
  • crates/core/tests/fixtures/codec/openai_responses/litellm_reasoning_input_item.json
  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/core/tests/unit/shared_tests.rs
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/core/tests/integration/pipeline_tests.rs
  • crates/core/tests/fixtures/codec/openai_responses/mixed_input_with_function_call_output.json
  • crates/core/src/codec/openai_chat.rs
  • crates/core/src/codec/response.rs
  • crates/core/src/codec/request.rs
  • crates/core/tests/unit/codec/response_tests.rs
  • crates/core/tests/integration/codec_tests.rs
  • crates/core/tests/unit/codec/request_tests.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
  • crates/core/tests/unit/codec/openai_chat_tests.rs
  • crates/core/tests/unit/codec/anthropic_tests.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/src/codec/openai_responses.rs
{crates/**/tests/**,python/tests/**,go/nemo_flow/**/*_test.go}

⚙️ CodeRabbit configuration file

{crates/**/tests/**,python/tests/**,go/nemo_flow/**/*_test.go}: Tests should cover the behavior promised by the changed API surface, including error paths and cross-request isolation where relevant.
Prefer assertions on lifecycle events, scope stacks, middleware ordering, and binding parity over shallow smoke tests.

Files:

  • crates/core/tests/fixtures/codec/openai_responses/anthropic_tool_choice_hint.json
  • crates/core/tests/fixtures/codec/anthropic/vllm_tool_choice_none_with_extensions.json
  • crates/core/tests/fixtures/codec/anthropic/vllm_system_block_with_non_text.json
  • crates/core/tests/fixtures/codec/openai_responses/strict_messages_array.json
  • crates/adaptive/tests/unit/cache_diagnostics_tests.rs
  • crates/core/tests/fixtures/codec/anthropic/litellm_cache_control_blocks.json
  • crates/adaptive/tests/unit/adaptive_hints_intercept_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
  • crates/core/tests/fixtures/codec/anthropic/litellm_thinking_output_config_reasoning_effort.json
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/core/tests/fixtures/codec/openai_responses/sglang_responses_request_with_extensions.json
  • crates/ffi/tests/unit/types_tests.rs
  • crates/adaptive/tests/unit/acg_learner_tests.rs
  • crates/adaptive/tests/unit/acg_component_tests.rs
  • crates/adaptive/tests/integration/acg_module_surface_tests.rs
  • crates/wasm/tests/coverage/callable_tests.rs
  • crates/adaptive/tests/unit/acg/ir_builder_tests.rs
  • crates/core/tests/fixtures/codec/openai_responses/litellm_reasoning_input_item.json
  • crates/ffi/tests/unit/callable_tests.rs
  • crates/ffi/tests/integration/callable_extra_tests.rs
  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/core/tests/unit/shared_tests.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/core/tests/integration/pipeline_tests.rs
  • crates/python/tests/coverage/py_types_coverage_tests.rs
  • crates/core/tests/fixtures/codec/openai_responses/mixed_input_with_function_call_output.json
  • crates/core/tests/unit/codec/response_tests.rs
  • crates/core/tests/integration/codec_tests.rs
  • crates/core/tests/unit/codec/request_tests.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
  • crates/core/tests/unit/codec/openai_chat_tests.rs
  • crates/core/tests/unit/codec/anthropic_tests.rs
**/*.rs

📄 CodeRabbit inference engine (.agents/skills/test-ffi-surface/SKILL.md)

**/*.rs: Run cargo fmt --all for FFI work as it is Rust work
Run just test-rust for FFI validation
Run cargo clippy --workspace --all-targets -- -D warnings to enforce warnings-as-errors linting

When Rust files changed as part of Python work, run cargo fmt --all, just test-rust, and cargo clippy --workspace --all-targets -- -D warnings

**/*.rs: Run cargo fmt --all for Rust code formatting
Run cargo clippy --workspace --all-targets -- -D warnings to enforce Rust linting with no warnings
Run just test-rust as the shared-runtime build/test wrapper for Rust changes

Use Rust snake_case naming convention for Rust code

**/*.rs: Any Rust change must run just test-rust
Any Rust change must run cargo fmt --all
Any Rust change must run cargo clippy --workspace --all-targets -- -D warnings

**/*.rs: Run cargo fmt --all for Rust code formatting when Node changes touch Rust files
Run cargo clippy --workspace --all-targets -- -D warnings to enforce strict linting when Rust files changed as part of Node work

**/*.rs: Always run just test-rust when any Rust code changes
Always run cargo fmt --all when any Rust code changes
Always run cargo clippy --workspace --all-targets -- -D warnings when any Rust code changes

Files:

  • crates/adaptive/tests/unit/cache_diagnostics_tests.rs
  • crates/adaptive/tests/unit/adaptive_hints_intercept_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/ffi/tests/unit/types_tests.rs
  • crates/python/src/py_types/codecs.rs
  • crates/adaptive/tests/unit/acg_learner_tests.rs
  • crates/adaptive/tests/unit/acg_component_tests.rs
  • crates/adaptive/tests/integration/acg_module_surface_tests.rs
  • crates/wasm/tests/coverage/callable_tests.rs
  • crates/adaptive/tests/unit/acg/ir_builder_tests.rs
  • crates/adaptive/src/acg/ir_builder.rs
  • crates/ffi/tests/unit/callable_tests.rs
  • crates/ffi/tests/integration/callable_extra_tests.rs
  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/core/tests/unit/shared_tests.rs
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/core/tests/integration/pipeline_tests.rs
  • crates/python/tests/coverage/py_types_coverage_tests.rs
  • crates/core/src/codec/openai_chat.rs
  • crates/core/src/codec/response.rs
  • crates/core/src/codec/request.rs
  • crates/core/tests/unit/codec/response_tests.rs
  • crates/core/tests/integration/codec_tests.rs
  • crates/core/tests/unit/codec/request_tests.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
  • crates/core/tests/unit/codec/openai_chat_tests.rs
  • crates/core/tests/unit/codec/anthropic_tests.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/src/codec/openai_responses.rs
**/*.{rs,go,js,ts,tsx}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Include SPDX license headers in all Rust, Go, JavaScript, and TypeScript source files using C-style comment syntax

Files:

  • crates/adaptive/tests/unit/cache_diagnostics_tests.rs
  • crates/adaptive/tests/unit/adaptive_hints_intercept_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/ffi/tests/unit/types_tests.rs
  • crates/python/src/py_types/codecs.rs
  • crates/adaptive/tests/unit/acg_learner_tests.rs
  • crates/adaptive/tests/unit/acg_component_tests.rs
  • crates/adaptive/tests/integration/acg_module_surface_tests.rs
  • crates/wasm/tests/coverage/callable_tests.rs
  • crates/adaptive/tests/unit/acg/ir_builder_tests.rs
  • crates/adaptive/src/acg/ir_builder.rs
  • crates/ffi/tests/unit/callable_tests.rs
  • crates/ffi/tests/integration/callable_extra_tests.rs
  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/core/tests/unit/shared_tests.rs
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/core/tests/integration/pipeline_tests.rs
  • crates/python/tests/coverage/py_types_coverage_tests.rs
  • crates/core/src/codec/openai_chat.rs
  • crates/core/src/codec/response.rs
  • crates/core/src/codec/request.rs
  • crates/core/tests/unit/codec/response_tests.rs
  • crates/core/tests/integration/codec_tests.rs
  • crates/core/tests/unit/codec/request_tests.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
  • crates/core/tests/unit/codec/openai_chat_tests.rs
  • crates/core/tests/unit/codec/anthropic_tests.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/src/codec/openai_responses.rs
**/*.{rs,py,go,js,ts,tsx}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Use SONAR_IGNORE_START / SONAR_IGNORE_END markers only for documented false positives that cannot be resolved in code; keep ignored blocks small, add explanatory comments, and require reviewer sign-off

Files:

  • crates/adaptive/tests/unit/cache_diagnostics_tests.rs
  • crates/adaptive/tests/unit/adaptive_hints_intercept_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/ffi/tests/unit/types_tests.rs
  • crates/python/src/py_types/codecs.rs
  • crates/adaptive/tests/unit/acg_learner_tests.rs
  • crates/adaptive/tests/unit/acg_component_tests.rs
  • crates/adaptive/tests/integration/acg_module_surface_tests.rs
  • crates/wasm/tests/coverage/callable_tests.rs
  • crates/adaptive/tests/unit/acg/ir_builder_tests.rs
  • crates/adaptive/src/acg/ir_builder.rs
  • crates/ffi/tests/unit/callable_tests.rs
  • crates/ffi/tests/integration/callable_extra_tests.rs
  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/core/tests/unit/shared_tests.rs
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/core/tests/integration/pipeline_tests.rs
  • crates/python/tests/coverage/py_types_coverage_tests.rs
  • crates/core/src/codec/openai_chat.rs
  • crates/core/src/codec/response.rs
  • crates/core/src/codec/request.rs
  • crates/core/tests/unit/codec/response_tests.rs
  • crates/core/tests/integration/codec_tests.rs
  • crates/core/tests/unit/codec/request_tests.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
  • crates/core/tests/unit/codec/openai_chat_tests.rs
  • crates/core/tests/unit/codec/anthropic_tests.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/src/codec/openai_responses.rs
{crates/adaptive/**,python/nemo_flow/{adaptive,plugin}.py,go/nemo_flow/{adaptive,**}/*.go,**/*.{ts,js,wasm}}

📄 CodeRabbit inference engine (.agents/skills/maintain-optimizer/SKILL.md)

Keep adaptive config schema, plugin lifecycle, and bindings in sync across crates/adaptive, core, bindings, Python (python/nemo_flow/adaptive.py and python/nemo_flow/plugin.py), Go (go/nemo_flow/adaptive and go/nemo_flow), and Node/WebAssembly helpers

Files:

  • crates/adaptive/tests/unit/cache_diagnostics_tests.rs
  • crates/adaptive/tests/unit/adaptive_hints_intercept_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/adaptive/tests/unit/acg_learner_tests.rs
  • crates/adaptive/tests/unit/acg_component_tests.rs
  • crates/adaptive/tests/integration/acg_module_surface_tests.rs
  • crates/adaptive/tests/unit/acg/ir_builder_tests.rs
  • crates/adaptive/src/acg/ir_builder.rs
  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/integration/redis_tests.rs
{crates/adaptive/**/*.rs,python/nemo_flow/adaptive.py,python/nemo_flow/plugin.py,go/nemo_flow/**/*.go,**/{helper,constructor,builder}.{ts,tsx,js}}

📄 CodeRabbit inference engine (.agents/skills/maintain-optimizer/SKILL.md)

Ensure typed helper constructors map cleanly to the same config document without divergence

Files:

  • crates/adaptive/tests/unit/cache_diagnostics_tests.rs
  • crates/adaptive/tests/unit/adaptive_hints_intercept_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/adaptive/tests/unit/acg_learner_tests.rs
  • crates/adaptive/tests/unit/acg_component_tests.rs
  • crates/adaptive/tests/integration/acg_module_surface_tests.rs
  • crates/adaptive/tests/unit/acg/ir_builder_tests.rs
  • crates/adaptive/src/acg/ir_builder.rs
  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/integration/redis_tests.rs
{crates/adaptive/**/*.rs,python/nemo_flow/plugin.py,go/nemo_flow/**/*.go,**/{plugin,lifecycle}.{ts,tsx,js}}

📄 CodeRabbit inference engine (.agents/skills/maintain-optimizer/SKILL.md)

Maintain consistent plugin lifecycle across all language bindings (Rust, Python, Go, Node/WebAssembly)

Files:

  • crates/adaptive/tests/unit/cache_diagnostics_tests.rs
  • crates/adaptive/tests/unit/adaptive_hints_intercept_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/adaptive/tests/unit/acg_learner_tests.rs
  • crates/adaptive/tests/unit/acg_component_tests.rs
  • crates/adaptive/tests/integration/acg_module_surface_tests.rs
  • crates/adaptive/tests/unit/acg/ir_builder_tests.rs
  • crates/adaptive/src/acg/ir_builder.rs
  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/integration/redis_tests.rs
{crates/adaptive/**/*.rs,python/nemo_flow/plugin.py,go/nemo_flow/**/*.go,**/{context,plugin}.{ts,tsx,js,rs}}

📄 CodeRabbit inference engine (.agents/skills/maintain-optimizer/SKILL.md)

Keep plugin context surfaces aligned across all language implementations

Files:

  • crates/adaptive/tests/unit/cache_diagnostics_tests.rs
  • crates/adaptive/tests/unit/adaptive_hints_intercept_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/adaptive/tests/unit/acg_learner_tests.rs
  • crates/adaptive/tests/unit/acg_component_tests.rs
  • crates/adaptive/tests/integration/acg_module_surface_tests.rs
  • crates/adaptive/tests/unit/acg/ir_builder_tests.rs
  • crates/adaptive/src/acg/ir_builder.rs
  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/integration/redis_tests.rs
{docs/**,examples/**,crates/adaptive/**,python/nemo_flow/**,go/nemo_flow/**,**/{example,component}.{ts,tsx,js,rs,py,go}}

📄 CodeRabbit inference engine (.agents/skills/maintain-optimizer/SKILL.md)

Any new adaptive component kind must have documentation, examples, and binding coverage across all supported languages

Files:

  • crates/adaptive/tests/unit/cache_diagnostics_tests.rs
  • crates/adaptive/tests/unit/adaptive_hints_intercept_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/adaptive/tests/unit/acg_learner_tests.rs
  • crates/adaptive/tests/unit/acg_component_tests.rs
  • crates/adaptive/tests/integration/acg_module_surface_tests.rs
  • crates/adaptive/tests/unit/acg/ir_builder_tests.rs
  • crates/adaptive/src/acg/ir_builder.rs
  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/integration/redis_tests.rs
**/*.{js,ts,tsx,jsx,py,rs,go,java,c,cpp,h,cc,cxx,cs,rb,php,swift,kt}

📄 CodeRabbit inference engine (.agents/skills/prepare-pr/SKILL.md)

Changed files must be formatted with the language-native formatter

Files:

  • crates/adaptive/tests/unit/cache_diagnostics_tests.rs
  • crates/adaptive/tests/unit/adaptive_hints_intercept_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/ffi/tests/unit/types_tests.rs
  • crates/python/src/py_types/codecs.rs
  • crates/adaptive/tests/unit/acg_learner_tests.rs
  • crates/adaptive/tests/unit/acg_component_tests.rs
  • crates/adaptive/tests/integration/acg_module_surface_tests.rs
  • crates/wasm/tests/coverage/callable_tests.rs
  • crates/adaptive/tests/unit/acg/ir_builder_tests.rs
  • crates/adaptive/src/acg/ir_builder.rs
  • crates/ffi/tests/unit/callable_tests.rs
  • crates/ffi/tests/integration/callable_extra_tests.rs
  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/core/tests/unit/shared_tests.rs
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/core/tests/integration/pipeline_tests.rs
  • crates/python/tests/coverage/py_types_coverage_tests.rs
  • crates/core/src/codec/openai_chat.rs
  • crates/core/src/codec/response.rs
  • crates/core/src/codec/request.rs
  • crates/core/tests/unit/codec/response_tests.rs
  • crates/core/tests/integration/codec_tests.rs
  • crates/core/tests/unit/codec/request_tests.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
  • crates/core/tests/unit/codec/openai_chat_tests.rs
  • crates/core/tests/unit/codec/anthropic_tests.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/src/codec/openai_responses.rs
{crates/core,crates/adaptive}/**/*.rs

📄 CodeRabbit inference engine (.agents/skills/test-wasm-binding/SKILL.md)

If the change touched shared runtime semantics in crates/core or crates/adaptive, also use validate-change

Files:

  • crates/adaptive/tests/unit/cache_diagnostics_tests.rs
  • crates/adaptive/tests/unit/adaptive_hints_intercept_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/adaptive/tests/unit/acg_learner_tests.rs
  • crates/adaptive/tests/unit/acg_component_tests.rs
  • crates/adaptive/tests/integration/acg_module_surface_tests.rs
  • crates/adaptive/tests/unit/acg/ir_builder_tests.rs
  • crates/adaptive/src/acg/ir_builder.rs
  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/core/tests/unit/shared_tests.rs
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/core/tests/integration/pipeline_tests.rs
  • crates/core/src/codec/openai_chat.rs
  • crates/core/src/codec/response.rs
  • crates/core/src/codec/request.rs
  • crates/core/tests/unit/codec/response_tests.rs
  • crates/core/tests/integration/codec_tests.rs
  • crates/core/tests/unit/codec/request_tests.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
  • crates/core/tests/unit/codec/openai_chat_tests.rs
  • crates/core/tests/unit/codec/anthropic_tests.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/src/codec/openai_responses.rs
crates/adaptive/**/*.rs

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

When crates/adaptive changes, run the full validation matrix across Rust, Python, Go, Node.js, and WebAssembly

Files:

  • crates/adaptive/tests/unit/cache_diagnostics_tests.rs
  • crates/adaptive/tests/unit/adaptive_hints_intercept_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/adaptive/tests/unit/acg_learner_tests.rs
  • crates/adaptive/tests/unit/acg_component_tests.rs
  • crates/adaptive/tests/integration/acg_module_surface_tests.rs
  • crates/adaptive/tests/unit/acg/ir_builder_tests.rs
  • crates/adaptive/src/acg/ir_builder.rs
  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/integration/redis_tests.rs
**/*.{py,js,ts,tsx,go,rs,md}

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

Format changed files with the language-native formatter before the final lint/test pass

Files:

  • crates/adaptive/tests/unit/cache_diagnostics_tests.rs
  • crates/adaptive/tests/unit/adaptive_hints_intercept_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/ffi/tests/unit/types_tests.rs
  • crates/python/src/py_types/codecs.rs
  • crates/adaptive/tests/unit/acg_learner_tests.rs
  • crates/adaptive/tests/unit/acg_component_tests.rs
  • crates/adaptive/tests/integration/acg_module_surface_tests.rs
  • crates/wasm/tests/coverage/callable_tests.rs
  • crates/adaptive/tests/unit/acg/ir_builder_tests.rs
  • crates/adaptive/src/acg/ir_builder.rs
  • crates/ffi/tests/unit/callable_tests.rs
  • crates/ffi/tests/integration/callable_extra_tests.rs
  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/core/tests/unit/shared_tests.rs
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/core/tests/integration/pipeline_tests.rs
  • crates/python/tests/coverage/py_types_coverage_tests.rs
  • crates/core/src/codec/openai_chat.rs
  • crates/core/src/codec/response.rs
  • crates/core/src/codec/request.rs
  • crates/core/tests/unit/codec/response_tests.rs
  • crates/core/tests/integration/codec_tests.rs
  • crates/core/tests/unit/codec/request_tests.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
  • crates/core/tests/unit/codec/openai_chat_tests.rs
  • crates/core/tests/unit/codec/anthropic_tests.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/src/codec/openai_responses.rs
**/*.{rs,py,js,ts,tsx,go}

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

During iteration, prefer uv run pre-commit run --files <changed files...> for targeted validation

Files:

  • crates/adaptive/tests/unit/cache_diagnostics_tests.rs
  • crates/adaptive/tests/unit/adaptive_hints_intercept_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/ffi/tests/unit/types_tests.rs
  • crates/python/src/py_types/codecs.rs
  • crates/adaptive/tests/unit/acg_learner_tests.rs
  • crates/adaptive/tests/unit/acg_component_tests.rs
  • crates/adaptive/tests/integration/acg_module_surface_tests.rs
  • crates/wasm/tests/coverage/callable_tests.rs
  • crates/adaptive/tests/unit/acg/ir_builder_tests.rs
  • crates/adaptive/src/acg/ir_builder.rs
  • crates/ffi/tests/unit/callable_tests.rs
  • crates/ffi/tests/integration/callable_extra_tests.rs
  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/core/tests/unit/shared_tests.rs
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/core/tests/integration/pipeline_tests.rs
  • crates/python/tests/coverage/py_types_coverage_tests.rs
  • crates/core/src/codec/openai_chat.rs
  • crates/core/src/codec/response.rs
  • crates/core/src/codec/request.rs
  • crates/core/tests/unit/codec/response_tests.rs
  • crates/core/tests/integration/codec_tests.rs
  • crates/core/tests/unit/codec/request_tests.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
  • crates/core/tests/unit/codec/openai_chat_tests.rs
  • crates/core/tests/unit/codec/anthropic_tests.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/src/codec/openai_responses.rs
crates/{core,adaptive}/**/*.rs

⚙️ CodeRabbit configuration file

crates/{core,adaptive}/**/*.rs: Review the Rust runtime for async correctness, scope isolation, middleware ordering, and event lifecycle regressions.
Pay close attention to task-local/thread-local scope propagation, callback lifetimes, stream finalization, and root_uuid isolation.
Public API changes should preserve existing behavior unless tests and docs show the intended migration path.

Files:

  • crates/adaptive/tests/unit/cache_diagnostics_tests.rs
  • crates/adaptive/tests/unit/adaptive_hints_intercept_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/adaptive/tests/unit/acg_learner_tests.rs
  • crates/adaptive/tests/unit/acg_component_tests.rs
  • crates/adaptive/tests/integration/acg_module_surface_tests.rs
  • crates/adaptive/tests/unit/acg/ir_builder_tests.rs
  • crates/adaptive/src/acg/ir_builder.rs
  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/core/tests/unit/shared_tests.rs
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/core/tests/integration/pipeline_tests.rs
  • crates/core/src/codec/openai_chat.rs
  • crates/core/src/codec/response.rs
  • crates/core/src/codec/request.rs
  • crates/core/tests/unit/codec/response_tests.rs
  • crates/core/tests/integration/codec_tests.rs
  • crates/core/tests/unit/codec/request_tests.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
  • crates/core/tests/unit/codec/openai_chat_tests.rs
  • crates/core/tests/unit/codec/anthropic_tests.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/src/codec/openai_responses.rs
**/{integrations,integration,*-integration}/**

📄 CodeRabbit inference engine (.agents/skills/contribute-integration/SKILL.md)

**/{integrations,integration,*-integration}/**: Keep NeMo Flow optional in framework integrations
Preserve the framework's original behavior when NeMo Flow is absent
Wrap tool and LLM paths at the correct framework boundary
Integration pattern must follow docs/integrate-frameworks/adding-scopes.md

Files:

  • crates/adaptive/tests/integration/runtime_integration_tests.rs
  • crates/adaptive/tests/integration/acg_module_surface_tests.rs
  • crates/ffi/tests/integration/callable_extra_tests.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/core/tests/integration/pipeline_tests.rs
  • crates/core/tests/integration/codec_tests.rs
crates/ffi/**

📄 CodeRabbit inference engine (.agents/skills/test-ffi-surface/SKILL.md)

Rebuild the FFI crate in release mode so the shared library and header stay in sync

Files:

  • crates/ffi/tests/unit/types_tests.rs
  • crates/ffi/tests/unit/callable_tests.rs
  • crates/ffi/tests/integration/callable_extra_tests.rs
crates/{python,ffi,node,wasm}/**/*

⚙️ CodeRabbit configuration file

crates/{python,ffi,node,wasm}/**/*: Treat binding changes as public API changes. Check for parity with the other language bindings, FFI ownership/lifetime safety,
callback error propagation, stable type conversion, and consistent async/stream semantics.
Flag changes that update one binding without corresponding tests or documentation for the same surface elsewhere.

Files:

  • crates/ffi/tests/unit/types_tests.rs
  • crates/python/src/py_types/codecs.rs
  • crates/wasm/tests/coverage/callable_tests.rs
  • crates/ffi/tests/unit/callable_tests.rs
  • crates/ffi/tests/integration/callable_extra_tests.rs
  • crates/python/tests/coverage/py_types_coverage_tests.rs
crates/python/**/*.rs

📄 CodeRabbit inference engine (.agents/skills/test-python-binding/SKILL.md)

When the native Rust bridge changed, add the Rust crate tests for nemo-flow-python

Files:

  • crates/python/src/py_types/codecs.rs
  • crates/python/tests/coverage/py_types_coverage_tests.rs
crates/wasm/**/*.rs

📄 CodeRabbit inference engine (.agents/skills/test-wasm-binding/SKILL.md)

crates/wasm/**/*.rs: Run cargo fmt --all, just test-rust, and cargo clippy --workspace --all-targets -- -D warnings when Rust files changed as part of WebAssembly work
Add cargo test -p nemo-flow-wasm when Rust-only WebAssembly helpers changed

Files:

  • crates/wasm/tests/coverage/callable_tests.rs
crates/core/**/*.rs

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

When crates/core changes, run the full validation matrix across Rust, Python, Go, Node.js, and WebAssembly

crates/core/**/*.rs: Use Json = serde_json::Value in Rust-facing runtime APIs where the existing code expects JSON payloads.
Use Result<T> with FlowError in core runtime paths. Keep errors explicit and binding-appropriate at the wrapper layer.

Files:

  • crates/core/tests/unit/shared_tests.rs
  • crates/core/tests/integration/pipeline_tests.rs
  • crates/core/src/codec/openai_chat.rs
  • crates/core/src/codec/response.rs
  • crates/core/src/codec/request.rs
  • crates/core/tests/unit/codec/response_tests.rs
  • crates/core/tests/integration/codec_tests.rs
  • crates/core/tests/unit/codec/request_tests.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
  • crates/core/tests/unit/codec/openai_chat_tests.rs
  • crates/core/tests/unit/codec/anthropic_tests.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/src/codec/openai_responses.rs
🔇 Additional comments (18)
crates/core/tests/fixtures/codec/anthropic/litellm_cache_control_blocks.json (1)

1-15: Fixture shape looks correct for cache_control block extraction.

Covers both system and messages[*].content[*] text blocks with cache_control variants (ephemeral, ephemeral+global) and should be useful for provider/hybrid parsing parity tests.

crates/core/tests/unit/shared_tests.rs (1)

40-52: LGTM: Mechanical fixture update matches expanded request structure.

The addition of these 13 optional fields (all set to None) correctly maintains the test fixture construction in line with the expanded AnnotatedLlmRequest schema.

As per coding guidelines, changes to crates/core must run the full validation matrix across Rust, Python, Go, Node.js, and WebAssembly.

crates/ffi/tests/unit/types_tests.rs (1)

524-536: LGTM: FFI test fixture updated consistently.

The FFI test fixture correctly mirrors the core test updates with the same 13 optional fields in the same order.

As per coding guidelines, FFI changes should rebuild the FFI crate in release mode to keep the shared library and header in sync.

crates/adaptive/tests/unit/acg_component_tests.rs (1)

100-112: LGTM: Adaptive test helper updated consistently.

The test helper correctly includes all 13 new optional fields in the same order as core and FFI test updates, maintaining consistency across the codebase.

As per coding guidelines, changes to crates/adaptive must run the full validation matrix across Rust, Python, Go, Node.js, and WebAssembly.

crates/adaptive/tests/integration/redis_tests.rs (1)

123-135: Request fixture update is correct and consistent

Explicitly setting the newly added optional request fields to None keeps this integration fixture aligned with the expanded IR shape.

crates/python/tests/coverage/py_types_coverage_tests.rs (1)

589-601: Coverage fixtures are correctly synchronized with the expanded request model

Both updated AnnotatedLLMRequest literals now include the added optional fields, which keeps these Python coverage paths compile-safe and aligned with the codec IR expansion.

Also applies to: 1358-1370

crates/adaptive/tests/integration/runtime_integration_tests.rs (1)

82-94: Helper request shape update looks good

The additional None assignments correctly track the expanded AnnotatedLlmRequest fields and keep this integration helper current.

crates/core/tests/fixtures/codec/anthropic/vllm_system_block_with_non_text.json (1)

1-11: Fixture is well-targeted for mixed-content system blocks

This payload cleanly exercises the case where system content includes non-text plus text, which is exactly what the updated extraction logic needs.

crates/adaptive/tests/integration/acg_module_surface_tests.rs (1)

146-158: Both test request literals are correctly updated

The added None fields keep these ACG module-surface tests aligned with the current AnnotatedLlmRequest shape.

Also applies to: 204-216

crates/adaptive/tests/unit/acg/ir_builder_tests.rs (1)

74-86: IR builder unit fixtures remain consistent after schema expansion

All three AnnotatedLlmRequest literals now include the new optional fields, which keeps these tests robust against the updated request model.

Also applies to: 126-138, 168-180

crates/adaptive/tests/unit/acg_profile_tests.rs (1)

20-32: Helper update is correct

Adding the new optional fields in the shared request(...) helper keeps all downstream profile tests aligned with the expanded AnnotatedLlmRequest model.

crates/wasm/tests/coverage/callable_tests.rs (1)

150-162: Fixture update correctly tracks the expanded request schema.

The new optional fields are consistently initialized and keep this callable fallback test aligned with the current AnnotatedLlmRequest shape.

crates/ffi/tests/integration/callable_extra_tests.rs (1)

267-279: Good parity update for FFI test fixture shape.

This keeps the integration test input synchronized with the expanded annotated request surface without changing test intent.

crates/core/tests/integration/codec_tests.rs (1)

34-47: Consistent schema migration across codec integration fixtures.

The repeated AnnotatedLlmRequest updates are coherent and preserve existing test semantics while matching the new request model.

Also applies to: 118-130, 154-167, 410-423

crates/adaptive/tests/unit/runtime_tests.rs (1)

54-67: Helper fixtures are correctly updated for the expanded request IR.

These updates keep adaptive runtime tests aligned with the current AnnotatedLlmRequest contract.

Also applies to: 98-110, 519-531

crates/core/tests/unit/codec/request_tests.rs (1)

261-267: Good assertion update for modeled stream behavior.

Switching from extra["stream"] to req.stream correctly validates the new typed-field contract.

crates/core/tests/unit/codec/response_tests.rs (1)

195-201: API-specific response fixtures are correctly expanded.

These additions keep round-trip coverage in sync with the new OpenAI Responses and Anthropic modeled fields.

Also applies to: 212-218

crates/core/tests/unit/codec/openai_chat_tests.rs (1)

549-571: Strong coverage additions for typed controls and multimodal image parts.

The new tests validate decode/encode behavior, override precedence, and image_url part round-tripping in the right places.

Also applies to: 583-620, 660-745

Comment thread crates/adaptive/src/acg_profile.rs Outdated
Comment thread crates/core/src/codec/openai_responses.rs
Comment thread crates/python/src/py_types/codecs.rs
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
crates/core/src/codec/openai_responses.rs (1)

448-455: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Prevent silent divergence between params.max_tokens and max_output_tokens.

Line 448/Line 505 populate two sources for the same control, and Line 580 can silently encode a stale value if only one field is mutated downstream. Add a divergence guard and compute one effective value before encoding.

Proposed fix
@@
-        // Overlay generation params.
+        // Overlay generation params (temperature/top_p/stop).
         if let Some(ref params) = annotated.params {
             overlay_generation_params(obj, params);
         }
+
+        let params_max_output_tokens = annotated.params.as_ref().and_then(|p| p.max_tokens);
+        if let (Some(a), Some(b)) = (annotated.max_output_tokens, params_max_output_tokens) {
+            if a != b {
+                return Err(FlowError::Internal(
+                    "OpenAI Responses encode: max_output_tokens and params.max_tokens diverged"
+                        .into(),
+                ));
+            }
+        }
@@
-        if let Some(max_output_tokens) = annotated.max_output_tokens {
+        if let Some(max_output_tokens) =
+            annotated.max_output_tokens.or(params_max_output_tokens)
+        {
             obj.insert("max_output_tokens".into(), Json::from(max_output_tokens));
         }

Also applies to: 505-506, 533-535, 580-582

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/core/src/codec/openai_responses.rs` around lines 448 - 455, The code
currently sets max_tokens from two places (obj.get("max_output_tokens") ->
max_output_tokens and GenerationParams.max_tokens) which can diverge and later
encode a stale value; fix by computing one canonical effective_max_tokens before
building GenerationParams and before encoding (e.g., prefer explicit
GenerationParams.max_tokens if present, otherwise fall back to
max_output_tokens, or enforce equality and error), then populate
GenerationParams.max_tokens from that single effective value and use the same
effective_max_tokens when serializing/encoding so params.max_tokens and
max_output_tokens cannot diverge (update the logic around GenerationParams
construction and the encode path that reads params.max_tokens /
max_output_tokens).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@crates/core/src/codec/openai_responses.rs`:
- Around line 448-455: The code currently sets max_tokens from two places
(obj.get("max_output_tokens") -> max_output_tokens and
GenerationParams.max_tokens) which can diverge and later encode a stale value;
fix by computing one canonical effective_max_tokens before building
GenerationParams and before encoding (e.g., prefer explicit
GenerationParams.max_tokens if present, otherwise fall back to
max_output_tokens, or enforce equality and error), then populate
GenerationParams.max_tokens from that single effective value and use the same
effective_max_tokens when serializing/encoding so params.max_tokens and
max_output_tokens cannot diverge (update the logic around GenerationParams
construction and the encode path that reads params.max_tokens /
max_output_tokens).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: e6340b81-8250-408a-8dac-214f941dbf00

📥 Commits

Reviewing files that changed from the base of the PR and between c9ea854 and 2e927e1.

📒 Files selected for processing (8)
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
  • crates/python/src/py_types/codecs.rs
  • crates/python/tests/coverage/py_types_coverage_tests.rs
📜 Review details
🧰 Additional context used
📓 Path-based instructions (20)
**/*.rs

📄 CodeRabbit inference engine (.agents/skills/test-ffi-surface/SKILL.md)

**/*.rs: Run cargo fmt --all for FFI work as it is Rust work
Run just test-rust for FFI validation
Run cargo clippy --workspace --all-targets -- -D warnings to enforce warnings-as-errors linting

When Rust files changed as part of Python work, run cargo fmt --all, just test-rust, and cargo clippy --workspace --all-targets -- -D warnings

**/*.rs: Run cargo fmt --all for Rust code formatting
Run cargo clippy --workspace --all-targets -- -D warnings to enforce Rust linting with no warnings
Run just test-rust as the shared-runtime build/test wrapper for Rust changes

Use Rust snake_case naming convention for Rust code

**/*.rs: Any Rust change must run just test-rust
Any Rust change must run cargo fmt --all
Any Rust change must run cargo clippy --workspace --all-targets -- -D warnings

**/*.rs: Run cargo fmt --all for Rust code formatting when Node changes touch Rust files
Run cargo clippy --workspace --all-targets -- -D warnings to enforce strict linting when Rust files changed as part of Node work

**/*.rs: Always run just test-rust when any Rust code changes
Always run cargo fmt --all when any Rust code changes
Always run cargo clippy --workspace --all-targets -- -D warnings when any Rust code changes

Files:

  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
  • crates/python/tests/coverage/py_types_coverage_tests.rs
  • crates/python/src/py_types/codecs.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
**/*.{rs,go,js,ts,tsx}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Include SPDX license headers in all Rust, Go, JavaScript, and TypeScript source files using C-style comment syntax

Files:

  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
  • crates/python/tests/coverage/py_types_coverage_tests.rs
  • crates/python/src/py_types/codecs.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
**/*.{rs,py,go,js,ts,tsx}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Use SONAR_IGNORE_START / SONAR_IGNORE_END markers only for documented false positives that cannot be resolved in code; keep ignored blocks small, add explanatory comments, and require reviewer sign-off

Files:

  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
  • crates/python/tests/coverage/py_types_coverage_tests.rs
  • crates/python/src/py_types/codecs.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
{crates/adaptive/**,python/nemo_flow/{adaptive,plugin}.py,go/nemo_flow/{adaptive,**}/*.go,**/*.{ts,js,wasm}}

📄 CodeRabbit inference engine (.agents/skills/maintain-optimizer/SKILL.md)

Keep adaptive config schema, plugin lifecycle, and bindings in sync across crates/adaptive, core, bindings, Python (python/nemo_flow/adaptive.py and python/nemo_flow/plugin.py), Go (go/nemo_flow/adaptive and go/nemo_flow), and Node/WebAssembly helpers

Files:

  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
{crates/adaptive/**/*.rs,python/nemo_flow/adaptive.py,python/nemo_flow/plugin.py,go/nemo_flow/**/*.go,**/{helper,constructor,builder}.{ts,tsx,js}}

📄 CodeRabbit inference engine (.agents/skills/maintain-optimizer/SKILL.md)

Ensure typed helper constructors map cleanly to the same config document without divergence

Files:

  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
{crates/adaptive/**/*.rs,python/nemo_flow/plugin.py,go/nemo_flow/**/*.go,**/{plugin,lifecycle}.{ts,tsx,js}}

📄 CodeRabbit inference engine (.agents/skills/maintain-optimizer/SKILL.md)

Maintain consistent plugin lifecycle across all language bindings (Rust, Python, Go, Node/WebAssembly)

Files:

  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
{crates/adaptive/**/*.rs,python/nemo_flow/plugin.py,go/nemo_flow/**/*.go,**/{context,plugin}.{ts,tsx,js,rs}}

📄 CodeRabbit inference engine (.agents/skills/maintain-optimizer/SKILL.md)

Keep plugin context surfaces aligned across all language implementations

Files:

  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
{docs/**,examples/**,crates/adaptive/**,python/nemo_flow/**,go/nemo_flow/**,**/{example,component}.{ts,tsx,js,rs,py,go}}

📄 CodeRabbit inference engine (.agents/skills/maintain-optimizer/SKILL.md)

Any new adaptive component kind must have documentation, examples, and binding coverage across all supported languages

Files:

  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
**/*.{js,ts,tsx,jsx,py,rs,go,java,c,cpp,h,cc,cxx,cs,rb,php,swift,kt}

📄 CodeRabbit inference engine (.agents/skills/prepare-pr/SKILL.md)

Changed files must be formatted with the language-native formatter

Files:

  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
  • crates/python/tests/coverage/py_types_coverage_tests.rs
  • crates/python/src/py_types/codecs.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
crates/{core,adaptive}/**

📄 CodeRabbit inference engine (.agents/skills/prepare-pr/SKILL.md)

Changes to crates/core or crates/adaptive must run the full language matrix

Files:

  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
{crates/core,crates/adaptive}/**/*.rs

📄 CodeRabbit inference engine (.agents/skills/test-wasm-binding/SKILL.md)

If the change touched shared runtime semantics in crates/core or crates/adaptive, also use validate-change

Files:

  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
crates/adaptive/**/*.rs

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

When crates/adaptive changes, run the full validation matrix across Rust, Python, Go, Node.js, and WebAssembly

Files:

  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
**/*.{py,js,ts,tsx,go,rs,md}

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

Format changed files with the language-native formatter before the final lint/test pass

Files:

  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
  • crates/python/tests/coverage/py_types_coverage_tests.rs
  • crates/python/src/py_types/codecs.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
**/*.{rs,py,js,ts,tsx,go}

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

During iteration, prefer uv run pre-commit run --files <changed files...> for targeted validation

Files:

  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
  • crates/python/tests/coverage/py_types_coverage_tests.rs
  • crates/python/src/py_types/codecs.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
crates/{core,adaptive}/**/*.rs

⚙️ CodeRabbit configuration file

crates/{core,adaptive}/**/*.rs: Review the Rust runtime for async correctness, scope isolation, middleware ordering, and event lifecycle regressions.
Pay close attention to task-local/thread-local scope propagation, callback lifetimes, stream finalization, and root_uuid isolation.
Public API changes should preserve existing behavior unless tests and docs show the intended migration path.

Files:

  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
{crates/**/tests/**,python/tests/**,go/nemo_flow/**/*_test.go}

⚙️ CodeRabbit configuration file

{crates/**/tests/**,python/tests/**,go/nemo_flow/**/*_test.go}: Tests should cover the behavior promised by the changed API surface, including error paths and cross-request isolation where relevant.
Prefer assertions on lifecycle events, scope stacks, middleware ordering, and binding parity over shallow smoke tests.

Files:

  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
  • crates/python/tests/coverage/py_types_coverage_tests.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
**/{integrations,integration,*-integration}/**

📄 CodeRabbit inference engine (.agents/skills/contribute-integration/SKILL.md)

**/{integrations,integration,*-integration}/**: Keep NeMo Flow optional in framework integrations
Preserve the framework's original behavior when NeMo Flow is absent
Wrap tool and LLM paths at the correct framework boundary
Integration pattern must follow docs/integrate-frameworks/adding-scopes.md

Files:

  • crates/adaptive/tests/integration/runtime_integration_tests.rs
crates/python/**/*.rs

📄 CodeRabbit inference engine (.agents/skills/test-python-binding/SKILL.md)

When the native Rust bridge changed, add the Rust crate tests for nemo-flow-python

Files:

  • crates/python/tests/coverage/py_types_coverage_tests.rs
  • crates/python/src/py_types/codecs.rs
crates/{python,ffi,node,wasm}/**/*

⚙️ CodeRabbit configuration file

crates/{python,ffi,node,wasm}/**/*: Treat binding changes as public API changes. Check for parity with the other language bindings, FFI ownership/lifetime safety,
callback error propagation, stable type conversion, and consistent async/stream semantics.
Flag changes that update one binding without corresponding tests or documentation for the same surface elsewhere.

Files:

  • crates/python/tests/coverage/py_types_coverage_tests.rs
  • crates/python/src/py_types/codecs.rs
crates/core/**/*.rs

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

When crates/core changes, run the full validation matrix across Rust, Python, Go, Node.js, and WebAssembly

crates/core/**/*.rs: Use Json = serde_json::Value in Rust-facing runtime APIs where the existing code expects JSON payloads.
Use Result<T> with FlowError in core runtime paths. Keep errors explicit and binding-appropriate at the wrapper layer.

Files:

  • crates/core/src/codec/openai_responses.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
🔇 Additional comments (5)
crates/adaptive/tests/unit/runtime_tests.rs (1)

54-66: Looks good: test fixtures are correctly synchronized with the expanded AnnotatedLlmRequest shape.

Initializing all newly added optional fields to None preserves existing test semantics while keeping request literals forward-compatible with the codec changes.

Also applies to: 98-110, 455-467, 532-544

crates/adaptive/src/acg_profile.rs (1)

191-196: Multimodal fingerprint signal is now preserved correctly.

ContentPart::ImageUrl is encoded as a stable non-PII marker (detail + SHA-256 of URL), which prevents image-only or image-different prompts from collapsing into identical fingerprints.

crates/adaptive/tests/unit/acg_profile_tests.rs (2)

7-33: Test fixture updates are aligned with the expanded request IR.

Adding OpenAiImageUrl and explicitly setting new optional AnnotatedLlmRequest fields keeps this helper synchronized with the current codec surface.


128-159: Good regression coverage for image-aware seed fingerprinting.

This test correctly asserts that changing only ContentPart::ImageUrl.url changes learning_seed_fingerprint, protecting the new multimodal signal path.

crates/python/src/py_types/codecs.rs (1)

51-74: Good binding-surface parity improvement.

The optional JSON helpers plus the new getters/setters provide consistent Python access to the expanded request fields and keep None-handling explicit.

Also applies to: 268-396

@afourniernv
Copy link
Copy Markdown
Contributor Author

Addressed the CodeRabbit nits in follow-up commit 2e927e1.

  • handle object-form tool_choice {"type": "none"} in the OpenAI Responses fallback decoder
  • preserve stable multimodal signal in ACG request fingerprinting instead of dropping image-only parts
  • expose the newly modeled AnnotatedLLMRequest fields through the Python binding properties, with focused coverage

Also fixed a few stale adaptive test AnnotatedLlmRequest literals that surfaced during the focused follow-up test runs.

Focused validation run:

  • cargo test -p nemo-flow test_decode_request_accepts_anthropic_none_tool_choice_object -- --test-threads=1
  • cargo test -p nemo-flow-adaptive acg_profile_image_parts_contribute_stable_fingerprint_signal -- --test-threads=1
  • cargo test -p nemo-flow-python test_annotated_llm_types_and_builtin_codecs_cover_mutators_and_codecs -- --test-threads=1

@afourniernv afourniernv changed the title codec: expand AnnotatedLlmRequest/Response extraction for OpenAI + Anthropic + hybrid payloads feat(codec): add missing optional AnnotatedLlmRequest/Response fields May 13, 2026
@github-actions github-actions Bot added the Feature a new feature label May 13, 2026
@willkill07
Copy link
Copy Markdown
Member

/ok to test 2e927e1

@afourniernv afourniernv force-pushed the feat/codec-ir-extraction branch from 675f7ba to a449142 Compare May 13, 2026 14:32
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
crates/core/src/codec/request.rs (1)

136-151: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update stale ContentPart capability docs.

The enum now supports ImageUrl, but the doc text still says v1 supports text only. Please align the comment with the actual variants to avoid misleading API docs.

Suggested doc fix
-/// v1 supports text only. Future versions may add `ImageUrl`, `Audio`, etc.
+/// v1 supports text and image URL parts.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/core/src/codec/request.rs` around lines 136 - 151, The doc comment
above the ContentPart enum is stale—update the comment to reflect current
variants (Text and ImageUrl) instead of saying "v1 supports text only";
specifically revise the paragraph for enum ContentPart to mention that v1
supports text and image URL parts (Text { text: String } and ImageUrl {
image_url: OpenAiImageUrl }) and note that future versions may add other kinds
like Audio, etc., so the generated API docs match the actual enum variants.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@crates/core/src/codec/anthropic.rs`:
- Around line 211-214: The messages array is currently populated even when a
Message::System contains only non-text content because extract_system_text
returning None still allows the original Message::System into the Anthropic
messages list; update the mapping/filtering logic that builds messages (where
you call extract_system_text and iterate over Message variants) to explicitly
skip any Message::System variant entirely (not just when extractable text
exists), ensuring only Message::User and Message::Assistant are pushed into the
Anthropic messages array and system prompts remain top-level; locate the code
that matches on Message (e.g., the closure using super::request::ContentPart and
extract_system_text) and add an explicit branch to ignore Message::System, or
move system extraction into top-level handling and only emit user/assistant
roles into messages.

In
`@crates/core/tests/fixtures/codec/anthropic/litellm_cache_control_blocks.json`:
- Line 2: The test fixture's "model" value uses the deprecated
"claude-sonnet-4-20250514"; update the JSON fixture by replacing the "model"
value with a current Claude Sonnet release (for example "claude-sonnet-4.6" or
the latest available non-deprecated identifier) so tests reference a supported
model version.
- Line 11: The fixture contains a non-standard "scope" field inside the
cache_control object ("cache_control": { "type": "ephemeral", "scope": "global"
}) which is not part of Anthropic's Messages API; either remove the "scope"
property so the block becomes {"type":"ephemeral"} (or add ttl if needed), or if
this is intentionally a LiteLLM extension, add a brief inline comment in the
fixture documenting that "scope" is a LiteLLM-only extension and not part of
Anthropic's official cache_control schema; update the JSON accordingly and keep
the "cache_control" key and "type":"ephemeral" intact.

---

Outside diff comments:
In `@crates/core/src/codec/request.rs`:
- Around line 136-151: The doc comment above the ContentPart enum is
stale—update the comment to reflect current variants (Text and ImageUrl) instead
of saying "v1 supports text only"; specifically revise the paragraph for enum
ContentPart to mention that v1 supports text and image URL parts (Text { text:
String } and ImageUrl { image_url: OpenAiImageUrl }) and note that future
versions may add other kinds like Audio, etc., so the generated API docs match
the actual enum variants.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 292b5a8a-a848-4f6d-9699-0bfe9afd027b

📥 Commits

Reviewing files that changed from the base of the PR and between 675f7ba and a449142.

📒 Files selected for processing (40)
  • crates/adaptive/src/acg/ir_builder.rs
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/integration/acg_module_surface_tests.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
  • crates/adaptive/tests/unit/acg/ir_builder_tests.rs
  • crates/adaptive/tests/unit/acg_component_tests.rs
  • crates/adaptive/tests/unit/acg_learner_tests.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/adaptive/tests/unit/adaptive_hints_intercept_tests.rs
  • crates/adaptive/tests/unit/cache_diagnostics_tests.rs
  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/src/codec/openai_chat.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/core/src/codec/request.rs
  • crates/core/src/codec/response.rs
  • crates/core/tests/fixtures/codec/anthropic/litellm_cache_control_blocks.json
  • crates/core/tests/fixtures/codec/anthropic/litellm_thinking_output_config_reasoning_effort.json
  • crates/core/tests/fixtures/codec/anthropic/vllm_system_block_with_non_text.json
  • crates/core/tests/fixtures/codec/anthropic/vllm_tool_choice_none_with_extensions.json
  • crates/core/tests/fixtures/codec/openai_responses/anthropic_tool_choice_hint.json
  • crates/core/tests/fixtures/codec/openai_responses/litellm_reasoning_input_item.json
  • crates/core/tests/fixtures/codec/openai_responses/mixed_input_with_function_call_output.json
  • crates/core/tests/fixtures/codec/openai_responses/sglang_responses_request_with_extensions.json
  • crates/core/tests/fixtures/codec/openai_responses/strict_messages_array.json
  • crates/core/tests/integration/codec_tests.rs
  • crates/core/tests/integration/pipeline_tests.rs
  • crates/core/tests/unit/codec/anthropic_tests.rs
  • crates/core/tests/unit/codec/openai_chat_tests.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
  • crates/core/tests/unit/codec/request_tests.rs
  • crates/core/tests/unit/codec/response_tests.rs
  • crates/core/tests/unit/shared_tests.rs
  • crates/ffi/tests/integration/callable_extra_tests.rs
  • crates/ffi/tests/unit/callable_tests.rs
  • crates/ffi/tests/unit/types_tests.rs
  • crates/python/src/py_types/codecs.rs
  • crates/python/tests/coverage/py_types_coverage_tests.rs
  • crates/wasm/tests/coverage/callable_tests.rs
📜 Review details
🧰 Additional context used
📓 Path-based instructions (22)
**/*.rs

📄 CodeRabbit inference engine (.agents/skills/test-ffi-surface/SKILL.md)

**/*.rs: Run cargo fmt --all for FFI work as it is Rust work
Run just test-rust for FFI validation
Run cargo clippy --workspace --all-targets -- -D warnings to enforce warnings-as-errors linting

When Rust files changed as part of Python work, run cargo fmt --all, just test-rust, and cargo clippy --workspace --all-targets -- -D warnings

**/*.rs: Run cargo fmt --all for Rust code formatting
Run cargo clippy --workspace --all-targets -- -D warnings to enforce Rust linting with no warnings
Run just test-rust as the shared-runtime build/test wrapper for Rust changes

Use Rust snake_case naming convention for Rust code

**/*.rs: Any Rust change must run just test-rust
Any Rust change must run cargo fmt --all
Any Rust change must run cargo clippy --workspace --all-targets -- -D warnings

**/*.rs: Run cargo fmt --all for Rust code formatting when Node changes touch Rust files
Run cargo clippy --workspace --all-targets -- -D warnings to enforce strict linting when Rust files changed as part of Node work

**/*.rs: Always run just test-rust when any Rust code changes
Always run cargo fmt --all when any Rust code changes
Always run cargo clippy --workspace --all-targets -- -D warnings when any Rust code changes

Files:

  • crates/adaptive/tests/unit/cache_diagnostics_tests.rs
  • crates/adaptive/tests/unit/acg/ir_builder_tests.rs
  • crates/adaptive/tests/unit/acg_learner_tests.rs
  • crates/ffi/tests/integration/callable_extra_tests.rs
  • crates/core/tests/integration/pipeline_tests.rs
  • crates/adaptive/src/acg/ir_builder.rs
  • crates/adaptive/tests/unit/adaptive_hints_intercept_tests.rs
  • crates/ffi/tests/unit/callable_tests.rs
  • crates/wasm/tests/coverage/callable_tests.rs
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/core/tests/unit/shared_tests.rs
  • crates/core/src/codec/openai_chat.rs
  • crates/adaptive/tests/integration/acg_module_surface_tests.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/core/tests/unit/codec/response_tests.rs
  • crates/adaptive/tests/unit/acg_component_tests.rs
  • crates/ffi/tests/unit/types_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
  • crates/core/tests/integration/codec_tests.rs
  • crates/core/src/codec/response.rs
  • crates/core/src/codec/request.rs
  • crates/python/tests/coverage/py_types_coverage_tests.rs
  • crates/python/src/py_types/codecs.rs
  • crates/core/tests/unit/codec/openai_chat_tests.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
  • crates/core/tests/unit/codec/request_tests.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/core/tests/unit/codec/anthropic_tests.rs
**/*.{rs,go,js,ts,tsx}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Include SPDX license headers in all Rust, Go, JavaScript, and TypeScript source files using C-style comment syntax

Files:

  • crates/adaptive/tests/unit/cache_diagnostics_tests.rs
  • crates/adaptive/tests/unit/acg/ir_builder_tests.rs
  • crates/adaptive/tests/unit/acg_learner_tests.rs
  • crates/ffi/tests/integration/callable_extra_tests.rs
  • crates/core/tests/integration/pipeline_tests.rs
  • crates/adaptive/src/acg/ir_builder.rs
  • crates/adaptive/tests/unit/adaptive_hints_intercept_tests.rs
  • crates/ffi/tests/unit/callable_tests.rs
  • crates/wasm/tests/coverage/callable_tests.rs
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/core/tests/unit/shared_tests.rs
  • crates/core/src/codec/openai_chat.rs
  • crates/adaptive/tests/integration/acg_module_surface_tests.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/core/tests/unit/codec/response_tests.rs
  • crates/adaptive/tests/unit/acg_component_tests.rs
  • crates/ffi/tests/unit/types_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
  • crates/core/tests/integration/codec_tests.rs
  • crates/core/src/codec/response.rs
  • crates/core/src/codec/request.rs
  • crates/python/tests/coverage/py_types_coverage_tests.rs
  • crates/python/src/py_types/codecs.rs
  • crates/core/tests/unit/codec/openai_chat_tests.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
  • crates/core/tests/unit/codec/request_tests.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/core/tests/unit/codec/anthropic_tests.rs
**/*.{rs,py,go,js,ts,tsx}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Use SONAR_IGNORE_START / SONAR_IGNORE_END markers only for documented false positives that cannot be resolved in code; keep ignored blocks small, add explanatory comments, and require reviewer sign-off

Files:

  • crates/adaptive/tests/unit/cache_diagnostics_tests.rs
  • crates/adaptive/tests/unit/acg/ir_builder_tests.rs
  • crates/adaptive/tests/unit/acg_learner_tests.rs
  • crates/ffi/tests/integration/callable_extra_tests.rs
  • crates/core/tests/integration/pipeline_tests.rs
  • crates/adaptive/src/acg/ir_builder.rs
  • crates/adaptive/tests/unit/adaptive_hints_intercept_tests.rs
  • crates/ffi/tests/unit/callable_tests.rs
  • crates/wasm/tests/coverage/callable_tests.rs
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/core/tests/unit/shared_tests.rs
  • crates/core/src/codec/openai_chat.rs
  • crates/adaptive/tests/integration/acg_module_surface_tests.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/core/tests/unit/codec/response_tests.rs
  • crates/adaptive/tests/unit/acg_component_tests.rs
  • crates/ffi/tests/unit/types_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
  • crates/core/tests/integration/codec_tests.rs
  • crates/core/src/codec/response.rs
  • crates/core/src/codec/request.rs
  • crates/python/tests/coverage/py_types_coverage_tests.rs
  • crates/python/src/py_types/codecs.rs
  • crates/core/tests/unit/codec/openai_chat_tests.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
  • crates/core/tests/unit/codec/request_tests.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/core/tests/unit/codec/anthropic_tests.rs
{crates/adaptive/**,python/nemo_flow/{adaptive,plugin}.py,go/nemo_flow/{adaptive,**}/*.go,**/*.{ts,js,wasm}}

📄 CodeRabbit inference engine (.agents/skills/maintain-optimizer/SKILL.md)

Keep adaptive config schema, plugin lifecycle, and bindings in sync across crates/adaptive, core, bindings, Python (python/nemo_flow/adaptive.py and python/nemo_flow/plugin.py), Go (go/nemo_flow/adaptive and go/nemo_flow), and Node/WebAssembly helpers

Files:

  • crates/adaptive/tests/unit/cache_diagnostics_tests.rs
  • crates/adaptive/tests/unit/acg/ir_builder_tests.rs
  • crates/adaptive/tests/unit/acg_learner_tests.rs
  • crates/adaptive/src/acg/ir_builder.rs
  • crates/adaptive/tests/unit/adaptive_hints_intercept_tests.rs
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/adaptive/tests/integration/acg_module_surface_tests.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/adaptive/tests/unit/acg_component_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
{crates/adaptive/**/*.rs,python/nemo_flow/adaptive.py,python/nemo_flow/plugin.py,go/nemo_flow/**/*.go,**/{helper,constructor,builder}.{ts,tsx,js}}

📄 CodeRabbit inference engine (.agents/skills/maintain-optimizer/SKILL.md)

Ensure typed helper constructors map cleanly to the same config document without divergence

Files:

  • crates/adaptive/tests/unit/cache_diagnostics_tests.rs
  • crates/adaptive/tests/unit/acg/ir_builder_tests.rs
  • crates/adaptive/tests/unit/acg_learner_tests.rs
  • crates/adaptive/src/acg/ir_builder.rs
  • crates/adaptive/tests/unit/adaptive_hints_intercept_tests.rs
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/adaptive/tests/integration/acg_module_surface_tests.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/adaptive/tests/unit/acg_component_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
{crates/adaptive/**/*.rs,python/nemo_flow/plugin.py,go/nemo_flow/**/*.go,**/{plugin,lifecycle}.{ts,tsx,js}}

📄 CodeRabbit inference engine (.agents/skills/maintain-optimizer/SKILL.md)

Maintain consistent plugin lifecycle across all language bindings (Rust, Python, Go, Node/WebAssembly)

Files:

  • crates/adaptive/tests/unit/cache_diagnostics_tests.rs
  • crates/adaptive/tests/unit/acg/ir_builder_tests.rs
  • crates/adaptive/tests/unit/acg_learner_tests.rs
  • crates/adaptive/src/acg/ir_builder.rs
  • crates/adaptive/tests/unit/adaptive_hints_intercept_tests.rs
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/adaptive/tests/integration/acg_module_surface_tests.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/adaptive/tests/unit/acg_component_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
{crates/adaptive/**/*.rs,python/nemo_flow/plugin.py,go/nemo_flow/**/*.go,**/{context,plugin}.{ts,tsx,js,rs}}

📄 CodeRabbit inference engine (.agents/skills/maintain-optimizer/SKILL.md)

Keep plugin context surfaces aligned across all language implementations

Files:

  • crates/adaptive/tests/unit/cache_diagnostics_tests.rs
  • crates/adaptive/tests/unit/acg/ir_builder_tests.rs
  • crates/adaptive/tests/unit/acg_learner_tests.rs
  • crates/adaptive/src/acg/ir_builder.rs
  • crates/adaptive/tests/unit/adaptive_hints_intercept_tests.rs
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/adaptive/tests/integration/acg_module_surface_tests.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/adaptive/tests/unit/acg_component_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
{docs/**,examples/**,crates/adaptive/**,python/nemo_flow/**,go/nemo_flow/**,**/{example,component}.{ts,tsx,js,rs,py,go}}

📄 CodeRabbit inference engine (.agents/skills/maintain-optimizer/SKILL.md)

Any new adaptive component kind must have documentation, examples, and binding coverage across all supported languages

Files:

  • crates/adaptive/tests/unit/cache_diagnostics_tests.rs
  • crates/adaptive/tests/unit/acg/ir_builder_tests.rs
  • crates/adaptive/tests/unit/acg_learner_tests.rs
  • crates/adaptive/src/acg/ir_builder.rs
  • crates/adaptive/tests/unit/adaptive_hints_intercept_tests.rs
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/adaptive/tests/integration/acg_module_surface_tests.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/adaptive/tests/unit/acg_component_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
**/*.{js,ts,tsx,jsx,py,rs,go,java,c,cpp,h,cc,cxx,cs,rb,php,swift,kt}

📄 CodeRabbit inference engine (.agents/skills/prepare-pr/SKILL.md)

Changed files must be formatted with the language-native formatter

Files:

  • crates/adaptive/tests/unit/cache_diagnostics_tests.rs
  • crates/adaptive/tests/unit/acg/ir_builder_tests.rs
  • crates/adaptive/tests/unit/acg_learner_tests.rs
  • crates/ffi/tests/integration/callable_extra_tests.rs
  • crates/core/tests/integration/pipeline_tests.rs
  • crates/adaptive/src/acg/ir_builder.rs
  • crates/adaptive/tests/unit/adaptive_hints_intercept_tests.rs
  • crates/ffi/tests/unit/callable_tests.rs
  • crates/wasm/tests/coverage/callable_tests.rs
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/core/tests/unit/shared_tests.rs
  • crates/core/src/codec/openai_chat.rs
  • crates/adaptive/tests/integration/acg_module_surface_tests.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/core/tests/unit/codec/response_tests.rs
  • crates/adaptive/tests/unit/acg_component_tests.rs
  • crates/ffi/tests/unit/types_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
  • crates/core/tests/integration/codec_tests.rs
  • crates/core/src/codec/response.rs
  • crates/core/src/codec/request.rs
  • crates/python/tests/coverage/py_types_coverage_tests.rs
  • crates/python/src/py_types/codecs.rs
  • crates/core/tests/unit/codec/openai_chat_tests.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
  • crates/core/tests/unit/codec/request_tests.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/core/tests/unit/codec/anthropic_tests.rs
crates/{core,adaptive}/**

📄 CodeRabbit inference engine (.agents/skills/prepare-pr/SKILL.md)

Changes to crates/core or crates/adaptive must run the full language matrix

Files:

  • crates/adaptive/tests/unit/cache_diagnostics_tests.rs
  • crates/core/tests/fixtures/codec/openai_responses/strict_messages_array.json
  • crates/core/tests/fixtures/codec/anthropic/vllm_tool_choice_none_with_extensions.json
  • crates/core/tests/fixtures/codec/openai_responses/sglang_responses_request_with_extensions.json
  • crates/core/tests/fixtures/codec/openai_responses/mixed_input_with_function_call_output.json
  • crates/core/tests/fixtures/codec/openai_responses/litellm_reasoning_input_item.json
  • crates/adaptive/tests/unit/acg/ir_builder_tests.rs
  • crates/adaptive/tests/unit/acg_learner_tests.rs
  • crates/core/tests/fixtures/codec/anthropic/litellm_thinking_output_config_reasoning_effort.json
  • crates/core/tests/fixtures/codec/anthropic/vllm_system_block_with_non_text.json
  • crates/core/tests/integration/pipeline_tests.rs
  • crates/adaptive/src/acg/ir_builder.rs
  • crates/adaptive/tests/unit/adaptive_hints_intercept_tests.rs
  • crates/core/tests/fixtures/codec/openai_responses/anthropic_tool_choice_hint.json
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/core/tests/unit/shared_tests.rs
  • crates/core/src/codec/openai_chat.rs
  • crates/adaptive/tests/integration/acg_module_surface_tests.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/core/tests/unit/codec/response_tests.rs
  • crates/adaptive/tests/unit/acg_component_tests.rs
  • crates/core/tests/fixtures/codec/anthropic/litellm_cache_control_blocks.json
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
  • crates/core/tests/integration/codec_tests.rs
  • crates/core/src/codec/response.rs
  • crates/core/src/codec/request.rs
  • crates/core/tests/unit/codec/openai_chat_tests.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
  • crates/core/tests/unit/codec/request_tests.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/core/tests/unit/codec/anthropic_tests.rs
{crates/core,crates/adaptive}/**/*.rs

📄 CodeRabbit inference engine (.agents/skills/test-wasm-binding/SKILL.md)

If the change touched shared runtime semantics in crates/core or crates/adaptive, also use validate-change

Files:

  • crates/adaptive/tests/unit/cache_diagnostics_tests.rs
  • crates/adaptive/tests/unit/acg/ir_builder_tests.rs
  • crates/adaptive/tests/unit/acg_learner_tests.rs
  • crates/core/tests/integration/pipeline_tests.rs
  • crates/adaptive/src/acg/ir_builder.rs
  • crates/adaptive/tests/unit/adaptive_hints_intercept_tests.rs
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/core/tests/unit/shared_tests.rs
  • crates/core/src/codec/openai_chat.rs
  • crates/adaptive/tests/integration/acg_module_surface_tests.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/core/tests/unit/codec/response_tests.rs
  • crates/adaptive/tests/unit/acg_component_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
  • crates/core/tests/integration/codec_tests.rs
  • crates/core/src/codec/response.rs
  • crates/core/src/codec/request.rs
  • crates/core/tests/unit/codec/openai_chat_tests.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
  • crates/core/tests/unit/codec/request_tests.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/core/tests/unit/codec/anthropic_tests.rs
crates/adaptive/**/*.rs

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

When crates/adaptive changes, run the full validation matrix across Rust, Python, Go, Node.js, and WebAssembly

Files:

  • crates/adaptive/tests/unit/cache_diagnostics_tests.rs
  • crates/adaptive/tests/unit/acg/ir_builder_tests.rs
  • crates/adaptive/tests/unit/acg_learner_tests.rs
  • crates/adaptive/src/acg/ir_builder.rs
  • crates/adaptive/tests/unit/adaptive_hints_intercept_tests.rs
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/adaptive/tests/integration/acg_module_surface_tests.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/adaptive/tests/unit/acg_component_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
**/*.{py,js,ts,tsx,go,rs,md}

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

Format changed files with the language-native formatter before the final lint/test pass

Files:

  • crates/adaptive/tests/unit/cache_diagnostics_tests.rs
  • crates/adaptive/tests/unit/acg/ir_builder_tests.rs
  • crates/adaptive/tests/unit/acg_learner_tests.rs
  • crates/ffi/tests/integration/callable_extra_tests.rs
  • crates/core/tests/integration/pipeline_tests.rs
  • crates/adaptive/src/acg/ir_builder.rs
  • crates/adaptive/tests/unit/adaptive_hints_intercept_tests.rs
  • crates/ffi/tests/unit/callable_tests.rs
  • crates/wasm/tests/coverage/callable_tests.rs
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/core/tests/unit/shared_tests.rs
  • crates/core/src/codec/openai_chat.rs
  • crates/adaptive/tests/integration/acg_module_surface_tests.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/core/tests/unit/codec/response_tests.rs
  • crates/adaptive/tests/unit/acg_component_tests.rs
  • crates/ffi/tests/unit/types_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
  • crates/core/tests/integration/codec_tests.rs
  • crates/core/src/codec/response.rs
  • crates/core/src/codec/request.rs
  • crates/python/tests/coverage/py_types_coverage_tests.rs
  • crates/python/src/py_types/codecs.rs
  • crates/core/tests/unit/codec/openai_chat_tests.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
  • crates/core/tests/unit/codec/request_tests.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/core/tests/unit/codec/anthropic_tests.rs
**/*.{rs,py,js,ts,tsx,go}

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

During iteration, prefer uv run pre-commit run --files <changed files...> for targeted validation

Files:

  • crates/adaptive/tests/unit/cache_diagnostics_tests.rs
  • crates/adaptive/tests/unit/acg/ir_builder_tests.rs
  • crates/adaptive/tests/unit/acg_learner_tests.rs
  • crates/ffi/tests/integration/callable_extra_tests.rs
  • crates/core/tests/integration/pipeline_tests.rs
  • crates/adaptive/src/acg/ir_builder.rs
  • crates/adaptive/tests/unit/adaptive_hints_intercept_tests.rs
  • crates/ffi/tests/unit/callable_tests.rs
  • crates/wasm/tests/coverage/callable_tests.rs
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/core/tests/unit/shared_tests.rs
  • crates/core/src/codec/openai_chat.rs
  • crates/adaptive/tests/integration/acg_module_surface_tests.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/core/tests/unit/codec/response_tests.rs
  • crates/adaptive/tests/unit/acg_component_tests.rs
  • crates/ffi/tests/unit/types_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
  • crates/core/tests/integration/codec_tests.rs
  • crates/core/src/codec/response.rs
  • crates/core/src/codec/request.rs
  • crates/python/tests/coverage/py_types_coverage_tests.rs
  • crates/python/src/py_types/codecs.rs
  • crates/core/tests/unit/codec/openai_chat_tests.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
  • crates/core/tests/unit/codec/request_tests.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/core/tests/unit/codec/anthropic_tests.rs
crates/{core,adaptive}/**/*.rs

⚙️ CodeRabbit configuration file

crates/{core,adaptive}/**/*.rs: Review the Rust runtime for async correctness, scope isolation, middleware ordering, and event lifecycle regressions.
Pay close attention to task-local/thread-local scope propagation, callback lifetimes, stream finalization, and root_uuid isolation.
Public API changes should preserve existing behavior unless tests and docs show the intended migration path.

Files:

  • crates/adaptive/tests/unit/cache_diagnostics_tests.rs
  • crates/adaptive/tests/unit/acg/ir_builder_tests.rs
  • crates/adaptive/tests/unit/acg_learner_tests.rs
  • crates/core/tests/integration/pipeline_tests.rs
  • crates/adaptive/src/acg/ir_builder.rs
  • crates/adaptive/tests/unit/adaptive_hints_intercept_tests.rs
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/core/tests/unit/shared_tests.rs
  • crates/core/src/codec/openai_chat.rs
  • crates/adaptive/tests/integration/acg_module_surface_tests.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/core/tests/unit/codec/response_tests.rs
  • crates/adaptive/tests/unit/acg_component_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
  • crates/core/tests/integration/codec_tests.rs
  • crates/core/src/codec/response.rs
  • crates/core/src/codec/request.rs
  • crates/core/tests/unit/codec/openai_chat_tests.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
  • crates/core/tests/unit/codec/request_tests.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/core/tests/unit/codec/anthropic_tests.rs
{crates/**/tests/**,python/tests/**,go/nemo_flow/**/*_test.go}

⚙️ CodeRabbit configuration file

{crates/**/tests/**,python/tests/**,go/nemo_flow/**/*_test.go}: Tests should cover the behavior promised by the changed API surface, including error paths and cross-request isolation where relevant.
Prefer assertions on lifecycle events, scope stacks, middleware ordering, and binding parity over shallow smoke tests.

Files:

  • crates/adaptive/tests/unit/cache_diagnostics_tests.rs
  • crates/core/tests/fixtures/codec/openai_responses/strict_messages_array.json
  • crates/core/tests/fixtures/codec/anthropic/vllm_tool_choice_none_with_extensions.json
  • crates/core/tests/fixtures/codec/openai_responses/sglang_responses_request_with_extensions.json
  • crates/core/tests/fixtures/codec/openai_responses/mixed_input_with_function_call_output.json
  • crates/core/tests/fixtures/codec/openai_responses/litellm_reasoning_input_item.json
  • crates/adaptive/tests/unit/acg/ir_builder_tests.rs
  • crates/adaptive/tests/unit/acg_learner_tests.rs
  • crates/ffi/tests/integration/callable_extra_tests.rs
  • crates/core/tests/fixtures/codec/anthropic/litellm_thinking_output_config_reasoning_effort.json
  • crates/core/tests/fixtures/codec/anthropic/vllm_system_block_with_non_text.json
  • crates/core/tests/integration/pipeline_tests.rs
  • crates/adaptive/tests/unit/adaptive_hints_intercept_tests.rs
  • crates/ffi/tests/unit/callable_tests.rs
  • crates/core/tests/fixtures/codec/openai_responses/anthropic_tool_choice_hint.json
  • crates/wasm/tests/coverage/callable_tests.rs
  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/core/tests/unit/shared_tests.rs
  • crates/adaptive/tests/integration/acg_module_surface_tests.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/core/tests/unit/codec/response_tests.rs
  • crates/adaptive/tests/unit/acg_component_tests.rs
  • crates/ffi/tests/unit/types_tests.rs
  • crates/core/tests/fixtures/codec/anthropic/litellm_cache_control_blocks.json
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
  • crates/core/tests/integration/codec_tests.rs
  • crates/python/tests/coverage/py_types_coverage_tests.rs
  • crates/core/tests/unit/codec/openai_chat_tests.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
  • crates/core/tests/unit/codec/request_tests.rs
  • crates/core/tests/unit/codec/anthropic_tests.rs
crates/ffi/**

📄 CodeRabbit inference engine (.agents/skills/test-ffi-surface/SKILL.md)

Rebuild the FFI crate in release mode so the shared library and header stay in sync

Files:

  • crates/ffi/tests/integration/callable_extra_tests.rs
  • crates/ffi/tests/unit/callable_tests.rs
  • crates/ffi/tests/unit/types_tests.rs
**/{integrations,integration,*-integration}/**

📄 CodeRabbit inference engine (.agents/skills/contribute-integration/SKILL.md)

**/{integrations,integration,*-integration}/**: Keep NeMo Flow optional in framework integrations
Preserve the framework's original behavior when NeMo Flow is absent
Wrap tool and LLM paths at the correct framework boundary
Integration pattern must follow docs/integrate-frameworks/adding-scopes.md

Files:

  • crates/ffi/tests/integration/callable_extra_tests.rs
  • crates/core/tests/integration/pipeline_tests.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/adaptive/tests/integration/acg_module_surface_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
  • crates/core/tests/integration/codec_tests.rs
crates/{python,ffi,node,wasm}/**/*

⚙️ CodeRabbit configuration file

crates/{python,ffi,node,wasm}/**/*: Treat binding changes as public API changes. Check for parity with the other language bindings, FFI ownership/lifetime safety,
callback error propagation, stable type conversion, and consistent async/stream semantics.
Flag changes that update one binding without corresponding tests or documentation for the same surface elsewhere.

Files:

  • crates/ffi/tests/integration/callable_extra_tests.rs
  • crates/ffi/tests/unit/callable_tests.rs
  • crates/wasm/tests/coverage/callable_tests.rs
  • crates/ffi/tests/unit/types_tests.rs
  • crates/python/tests/coverage/py_types_coverage_tests.rs
  • crates/python/src/py_types/codecs.rs
crates/core/**/*.rs

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

When crates/core changes, run the full validation matrix across Rust, Python, Go, Node.js, and WebAssembly

crates/core/**/*.rs: Use Json = serde_json::Value in Rust-facing runtime APIs where the existing code expects JSON payloads.
Use Result<T> with FlowError in core runtime paths. Keep errors explicit and binding-appropriate at the wrapper layer.

Files:

  • crates/core/tests/integration/pipeline_tests.rs
  • crates/core/tests/unit/shared_tests.rs
  • crates/core/src/codec/openai_chat.rs
  • crates/core/tests/unit/codec/response_tests.rs
  • crates/core/tests/integration/codec_tests.rs
  • crates/core/src/codec/response.rs
  • crates/core/src/codec/request.rs
  • crates/core/tests/unit/codec/openai_chat_tests.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
  • crates/core/tests/unit/codec/request_tests.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/core/tests/unit/codec/anthropic_tests.rs
crates/wasm/**/*.rs

📄 CodeRabbit inference engine (.agents/skills/test-wasm-binding/SKILL.md)

crates/wasm/**/*.rs: Run cargo fmt --all, just test-rust, and cargo clippy --workspace --all-targets -- -D warnings when Rust files changed as part of WebAssembly work
Add cargo test -p nemo-flow-wasm when Rust-only WebAssembly helpers changed

Files:

  • crates/wasm/tests/coverage/callable_tests.rs
crates/python/**/*.rs

📄 CodeRabbit inference engine (.agents/skills/test-python-binding/SKILL.md)

When the native Rust bridge changed, add the Rust crate tests for nemo-flow-python

Files:

  • crates/python/tests/coverage/py_types_coverage_tests.rs
  • crates/python/src/py_types/codecs.rs
🔇 Additional comments (38)
crates/core/tests/fixtures/codec/anthropic/litellm_thinking_output_config_reasoning_effort.json (1)

1-11: LGTM!

crates/core/tests/fixtures/codec/openai_responses/anthropic_tool_choice_hint.json (1)

1-5: LGTM!

crates/core/tests/fixtures/codec/openai_responses/strict_messages_array.json (1)

1-9: LGTM!

crates/adaptive/tests/unit/cache_diagnostics_tests.rs (1)

107-119: LGTM!

crates/core/tests/fixtures/codec/openai_responses/mixed_input_with_function_call_output.json (1)

1-7: LGTM!

crates/core/tests/fixtures/codec/openai_responses/sglang_responses_request_with_extensions.json (1)

1-18: LGTM!

crates/core/tests/fixtures/codec/openai_responses/litellm_reasoning_input_item.json (1)

1-11: LGTM!

crates/core/src/codec/request.rs (1)

40-78: LGTM!

Also applies to: 154-161, 271-274, 289-292

crates/core/tests/integration/pipeline_tests.rs (1)

101-113: LGTM!

crates/adaptive/tests/integration/acg_module_surface_tests.rs (1)

146-158: LGTM!

Also applies to: 204-216

crates/adaptive/tests/unit/acg_component_tests.rs (1)

100-112: LGTM!

crates/core/tests/unit/codec/request_tests.rs (1)

29-41: LGTM!

Also applies to: 261-261, 304-316, 372-384, 401-413, 432-444, 476-488, 505-517, 543-555, 584-596, 613-625, 643-655

crates/adaptive/tests/unit/acg_learner_tests.rs (1)

37-49: LGTM!

crates/core/tests/unit/shared_tests.rs (1)

40-52: LGTM!

crates/adaptive/tests/unit/adaptive_hints_intercept_tests.rs (1)

182-194: LGTM!

crates/adaptive/tests/integration/redis_tests.rs (1)

123-135: LGTM!

crates/core/tests/integration/codec_tests.rs (1)

34-46: LGTM!

Also applies to: 118-130, 154-166, 410-422, 451-463, 476-488, 522-534, 551-563, 582-594, 622-634, 658-670, 695-707, 724-736, 754-766

crates/ffi/tests/integration/callable_extra_tests.rs (1)

267-279: LGTM!

crates/ffi/tests/unit/types_tests.rs (1)

524-536: LGTM!

crates/ffi/tests/unit/callable_tests.rs (1)

326-338: LGTM!

crates/core/src/codec/openai_chat.rs (1)

115-121: LGTM!

Also applies to: 273-288, 317-340

crates/wasm/tests/coverage/callable_tests.rs (1)

150-162: LGTM!

crates/adaptive/tests/integration/runtime_integration_tests.rs (1)

82-94: LGTM!

Also applies to: 116-128, 157-169, 209-221

crates/core/tests/unit/codec/openai_chat_tests.rs (1)

9-9: LGTM!

Also applies to: 541-541, 549-571, 583-620, 660-690, 692-711, 713-745, 824-836, 880-892, 925-937, 968-980

crates/core/src/codec/response.rs (1)

184-204: LGTM!

Also applies to: 210-227, 258-261

crates/adaptive/src/acg/ir_builder.rs (1)

150-152: LGTM!

crates/adaptive/tests/unit/acg/ir_builder_tests.rs (1)

74-86: LGTM!

Also applies to: 126-138, 168-180

crates/core/tests/unit/codec/response_tests.rs (1)

195-201: LGTM!

Also applies to: 212-217

crates/core/tests/fixtures/codec/anthropic/vllm_tool_choice_none_with_extensions.json (1)

1-10: LGTM!

crates/core/tests/fixtures/codec/anthropic/vllm_system_block_with_non_text.json (1)

1-11: LGTM!

crates/core/tests/unit/codec/anthropic_tests.rs (1)

23-25: LGTM!

Also applies to: 527-602, 639-673, 841-853, 870-870

crates/core/src/codec/openai_responses.rs (1)

52-56: LGTM!

Also applies to: 67-82, 117-133, 145-159, 298-330, 350-385, 412-509, 521-597

crates/core/tests/unit/codec/openai_responses_tests.rs (1)

23-25: LGTM!

Also applies to: 114-138, 141-172, 393-405, 410-410, 458-460, 462-500, 501-520, 521-531, 532-543, 544-565, 566-593, 658-701, 703-720, 779-791

crates/python/src/py_types/codecs.rs (1)

51-71: LGTM!

Also applies to: 132-144, 265-393

crates/python/tests/coverage/py_types_coverage_tests.rs (1)

589-601: LGTM!

Also applies to: 1071-1083, 1102-1120, 1125-1149, 1158-1168, 1423-1435

crates/adaptive/src/acg_profile.rs (1)

191-196: LGTM!

crates/adaptive/tests/unit/runtime_tests.rs (1)

54-66: LGTM!

Also applies to: 98-110, 455-467, 532-544

crates/adaptive/tests/unit/acg_profile_tests.rs (1)

7-8: LGTM!

Also applies to: 21-33, 128-159

Comment thread crates/core/src/codec/anthropic.rs
Comment thread crates/core/tests/fixtures/codec/anthropic/litellm_cache_control_blocks.json Outdated
Comment thread crates/core/tests/fixtures/codec/anthropic/litellm_cache_control_blocks.json Outdated
@willkill07
Copy link
Copy Markdown
Member

/ok to test a449142

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@crates/core/tests/unit/codec/anthropic_tests.rs`:
- Around line 699-703: The test currently only asserts
obj.get("tool_choice").and_then(|v| v.get("disable_parallel_tool_use")) and can
miss regressions that drop or change the tool_choice.type field; add a companion
assertion that checks obj.get("tool_choice").and_then(|v| v.get("type")) is
present and equals the expected string (e.g., Some(&json!("tool"))) so the test
validates both the presence and value of "type" alongside
"disable_parallel_tool_use".
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: b80668ac-c61f-4c63-a1d8-8088b8790bba

📥 Commits

Reviewing files that changed from the base of the PR and between a449142 and 33f4ca0.

📒 Files selected for processing (2)
  • crates/core/tests/unit/codec/anthropic_tests.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
📜 Review details
🧰 Additional context used
📓 Path-based instructions (11)
**/*.rs

📄 CodeRabbit inference engine (.agents/skills/test-ffi-surface/SKILL.md)

**/*.rs: Run cargo fmt --all for FFI work as it is Rust work
Run just test-rust for FFI validation
Run cargo clippy --workspace --all-targets -- -D warnings to enforce warnings-as-errors linting

**/*.rs: Run cargo fmt --all for Rust code formatting
Run cargo clippy --workspace --all-targets -- -D warnings to enforce Rust linting with no warnings
Run just test-rust as the shared-runtime build/test wrapper for Rust changes

Use Rust snake_case naming convention for Rust code

**/*.rs: Any Rust change must run just test-rust
Any Rust change must run cargo fmt --all
Any Rust change must run cargo clippy --workspace --all-targets -- -D warnings

**/*.rs: Run cargo fmt --all for Rust code formatting when Node changes touch Rust files
Run cargo clippy --workspace --all-targets -- -D warnings to enforce strict linting when Rust files changed as part of Node work

**/*.rs: Always run just test-rust when any Rust code changes
Always run cargo fmt --all when any Rust code changes
Always run cargo clippy --workspace --all-targets -- -D warnings when any Rust code changes

Files:

  • crates/core/tests/unit/codec/anthropic_tests.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
**/*.{rs,go,js,ts,tsx}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Include SPDX license headers in all Rust, Go, JavaScript, and TypeScript source files using C-style comment syntax

Files:

  • crates/core/tests/unit/codec/anthropic_tests.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
**/*.{rs,py,go,js,ts,tsx}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Use SONAR_IGNORE_START / SONAR_IGNORE_END markers only for documented false positives that cannot be resolved in code; keep ignored blocks small, add explanatory comments, and require reviewer sign-off

Files:

  • crates/core/tests/unit/codec/anthropic_tests.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
**/*.{js,ts,tsx,jsx,py,rs,go,java,c,cpp,h,cc,cxx,cs,rb,php,swift,kt}

📄 CodeRabbit inference engine (.agents/skills/prepare-pr/SKILL.md)

Changed files must be formatted with the language-native formatter

Files:

  • crates/core/tests/unit/codec/anthropic_tests.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
crates/{core,adaptive}/**

📄 CodeRabbit inference engine (.agents/skills/prepare-pr/SKILL.md)

Changes to crates/core or crates/adaptive must run the full language matrix

Files:

  • crates/core/tests/unit/codec/anthropic_tests.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
{crates/core,crates/adaptive}/**/*.rs

📄 CodeRabbit inference engine (.agents/skills/test-wasm-binding/SKILL.md)

If the change touched shared runtime semantics in crates/core or crates/adaptive, also use validate-change

Files:

  • crates/core/tests/unit/codec/anthropic_tests.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
crates/core/**/*.rs

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

When crates/core changes, run the full validation matrix across Rust, Python, Go, Node.js, and WebAssembly

crates/core/**/*.rs: Use Json = serde_json::Value in Rust-facing runtime APIs where the existing code expects JSON payloads.
Use Result<T> with FlowError in core runtime paths. Keep errors explicit and binding-appropriate at the wrapper layer.

Files:

  • crates/core/tests/unit/codec/anthropic_tests.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
**/*.{py,js,ts,tsx,go,rs,md}

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

Format changed files with the language-native formatter before the final lint/test pass

Files:

  • crates/core/tests/unit/codec/anthropic_tests.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
**/*.{rs,py,js,ts,tsx,go}

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

During iteration, prefer uv run pre-commit run --files <changed files...> for targeted validation

Files:

  • crates/core/tests/unit/codec/anthropic_tests.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
crates/{core,adaptive}/**/*.rs

⚙️ CodeRabbit configuration file

crates/{core,adaptive}/**/*.rs: Review the Rust runtime for async correctness, scope isolation, middleware ordering, and event lifecycle regressions.
Pay close attention to task-local/thread-local scope propagation, callback lifetimes, stream finalization, and root_uuid isolation.
Public API changes should preserve existing behavior unless tests and docs show the intended migration path.

Files:

  • crates/core/tests/unit/codec/anthropic_tests.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
{crates/**/tests/**,python/tests/**,go/nemo_flow/**/*_test.go}

⚙️ CodeRabbit configuration file

{crates/**/tests/**,python/tests/**,go/nemo_flow/**/*_test.go}: Tests should cover the behavior promised by the changed API surface, including error paths and cross-request isolation where relevant.
Prefer assertions on lifecycle events, scope stacks, middleware ordering, and binding parity over shallow smoke tests.

Files:

  • crates/core/tests/unit/codec/anthropic_tests.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
🔇 Additional comments (5)
crates/core/tests/unit/codec/openai_responses_tests.rs (4)

110-135: LGTM!

Also applies to: 137-168


389-413: LGTM!

Also applies to: 460-501, 503-628


693-755: LGTM!


814-826: LGTM!

crates/core/tests/unit/codec/anthropic_tests.rs (1)

227-233: LGTM!

Also applies to: 247-252, 274-278, 300-316, 523-540, 543-564, 567-587, 589-617, 620-646, 671-698, 704-704, 873-885, 902-902

Comment thread crates/core/tests/unit/codec/anthropic_tests.rs
Signed-off-by: Alex Fournier <afournier@nvidia.com>
Signed-off-by: Alex Fournier <afournier@nvidia.com>
…llelism

Signed-off-by: Alex Fournier <afournier@nvidia.com>
Signed-off-by: Alex Fournier <afournier@nvidia.com>
…le hybrid fixtures

Signed-off-by: Alex Fournier <afournier@nvidia.com>
Signed-off-by: Alex Fournier <afournier@nvidia.com>
Signed-off-by: Alex Fournier <afournier@nvidia.com>
Signed-off-by: Alex Fournier <afournier@nvidia.com>
Signed-off-by: Alex Fournier <afournier@nvidia.com>
Signed-off-by: Alex Fournier <afournier@nvidia.com>
Signed-off-by: Alex Fournier <afournier@nvidia.com>
Signed-off-by: Alex Fournier <afournier@nvidia.com>
Signed-off-by: Alex Fournier <afournier@nvidia.com>
Signed-off-by: Alex Fournier <afournier@nvidia.com>
Signed-off-by: Alex Fournier <afournier@nvidia.com>
Signed-off-by: Alex Fournier <afournier@nvidia.com>
Signed-off-by: Alex Fournier <afournier@nvidia.com>
Signed-off-by: Alex Fournier <afournier@nvidia.com>
@afourniernv afourniernv force-pushed the feat/codec-ir-extraction branch from 33f4ca0 to af027f1 Compare May 13, 2026 18:54
@willkill07
Copy link
Copy Markdown
Member

/ok to test af027f1

@willkill07
Copy link
Copy Markdown
Member

/merge

@rapids-bot rapids-bot Bot merged commit 704428b into NVIDIA:main May 13, 2026
65 of 66 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature a new feature lang:rust PR changes/introduces Rust code size:XL PR is extra large

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants