Skip to content

Bug/strands unit tests#1196

Merged
rapids-bot[bot] merged 4 commits intoNVIDIA:developfrom
bbednarski9:bug/strands-unit-tests
Nov 21, 2025
Merged

Bug/strands unit tests#1196
rapids-bot[bot] merged 4 commits intoNVIDIA:developfrom
bbednarski9:bug/strands-unit-tests

Conversation

@bbednarski9
Copy link
Contributor

@bbednarski9 bbednarski9 commented Nov 20, 2025

Description

Bumping up strands-agents to v1.17.0 to properly support "system_prompt_content" parameter in strands.models.openai.OpenAIModel.format_request_messages(). Also bumping up token limit in E2E integration tests from 65/96 to 256 to avoid intermittent errors with simple_calculator integration test.
Closes

By Submitting this PR I confirm:

  • I am familiar with the Contributing Guidelines.
  • We require that all contributors "sign-off" on their commits. This certifies that the contribution is your original work, or you have rights to submit it under the same license, or a compatible license.
    • Any contribution which contains commits that are not Signed-Off will not be accepted.
  • When the PR is ready for review, new or existing tests cover these changes.
  • When the PR is ready for review, the documentation is up to date with these changes.

Summary by CodeRabbit

  • Dependencies

    • Updated strands-agents dependency from 1.15 to 1.17
  • Improvements

    • Increased model token limits in integration tests (up to 256) to allow longer interactions
    • Improved test infrastructure with environment-aware fixtures for conditional integration test execution

✏️ Tip: You can customize this high-level summary in your review settings.

Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
@bbednarski9 bbednarski9 requested review from a team as code owners November 20, 2025 19:58
@coderabbitai
Copy link

coderabbitai bot commented Nov 20, 2025

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

Updates the strands-agents dependency constraint from ~=1.15 to ~=1.17 and increases max_tokens in multiple LLM integration tests in the nvidia_nat_strands package; no other functional changes are present.

Changes

Cohort / File(s) Change Summary
Dependency Update
packages/nvidia_nat_strands/pyproject.toml
Updated strands-agents version constraint from ~=1.15 to ~=1.17 in project dependencies.
Integration Test Adjustments
packages/nvidia_nat_strands/tests/test_strands_integration.py
Increased max_tokens values in OpenAI, NIM, and Bedrock integration test configurations (multiple tests changed from 64/80/96 → 256); no other test logic or control flow altered.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Check compatibility of strands-agents ~=1.17 with current code.
  • Confirm increased max_tokens values are intentional and appropriate for the target models/tests.

Pre-merge checks and finishing touches

Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Bug/strands unit tests' is vague and does not clearly convey the main changes: upgrading strands-agents dependency and increasing token limits in tests. Revise the title to be more specific and descriptive, such as 'Bump strands-agents to v1.17 and increase test token limits' or similar, to clearly summarize the main changes.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link

@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

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b00007e and 1cbe973.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • packages/nvidia_nat_strands/pyproject.toml (1 hunks)
  • packages/nvidia_nat_strands/tests/test_strands_integration.py (6 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*

⚙️ CodeRabbit configuration file

**/*: # Code Review Instructions

  • Ensure the code follows best practices and coding standards. - For Python code, follow
    PEP 20 and
    PEP 8 for style guidelines.
  • Check for security vulnerabilities and potential issues. - Python methods should use type hints for all parameters and return values.
    Example:
    def my_function(param1: int, param2: str) -> bool:
        pass
  • For Python exception handling, ensure proper stack trace preservation:
    • When re-raising exceptions: use bare raise statements to maintain the original stack trace,
      and use logger.error() (not logger.exception()) to avoid duplicate stack trace output.
    • When catching and logging exceptions without re-raising: always use logger.exception()
      to capture the full stack trace information.

Documentation Review Instructions - Verify that documentation and comments are clear and comprehensive. - Verify that the documentation doesn't contain any TODOs, FIXMEs or placeholder text like "lorem ipsum". - Verify that the documentation doesn't contain any offensive or outdated terms. - Verify that documentation and comments are free of spelling mistakes, ensure the documentation doesn't contain any

words listed in the ci/vale/styles/config/vocabularies/nat/reject.txt file, words that might appear to be
spelling mistakes but are listed in the ci/vale/styles/config/vocabularies/nat/accept.txt file are OK.

Misc. - All code (except .mdc files that contain Cursor rules) should be licensed under the Apache License 2.0,

and should contain an Apache License 2.0 header comment at the top of each file.

  • Confirm that copyright years are up-to date whenever a file is changed.

Files:

  • packages/nvidia_nat_strands/pyproject.toml
  • packages/nvidia_nat_strands/tests/test_strands_integration.py
packages/**/*

⚙️ CodeRabbit configuration file

packages/**/*: - This directory contains optional plugin packages for the toolkit, each should contain a pyproject.toml file. - The pyproject.toml file should declare a dependency on nvidia-nat or another package with a name starting
with nvidia-nat-. This dependency should be declared using ~=<version>, and the version should be a two
digit version (ex: ~=1.0).

  • Not all packages contain Python code, if they do they should also contain their own set of tests, in a
    tests/ directory at the same level as the pyproject.toml file.

Files:

  • packages/nvidia_nat_strands/pyproject.toml
  • packages/nvidia_nat_strands/tests/test_strands_integration.py
🧠 Learnings (2)
📚 Learning: 2025-11-10T21:26:35.059Z
Learnt from: jiaxiangr
Repo: NVIDIA/NeMo-Agent-Toolkit PR: 974
File: packages/nvidia_nat_all/pyproject.toml:39-39
Timestamp: 2025-11-10T21:26:35.059Z
Learning: In packages/nvidia_nat_all/pyproject.toml, workspace dependencies (nvidia-nat-* plugin packages) should NOT have version constraints because they are managed as workspace dependencies. Version constraints are only applied to the base nvidia-nat package and external dependencies, not to internal workspace packages.

Applied to files:

  • packages/nvidia_nat_strands/pyproject.toml
📚 Learning: 2025-11-14T20:33:53.944Z
Learnt from: AnuradhaKaruppiah
Repo: NVIDIA/NeMo-Agent-Toolkit PR: 1181
File: packages/nvidia_nat_test/tests/test_test_llm.py:419-484
Timestamp: 2025-11-14T20:33:53.944Z
Learning: The NVIDIA NeMo-Agent-Toolkit project uses pytest-asyncio in strict mode (the default), which requires pytest.mark.asyncio decorator on all async test functions. All async tests in packages/nvidia_nat_test/tests/test_test_llm.py consistently follow this pattern.

Applied to files:

  • packages/nvidia_nat_strands/tests/test_strands_integration.py
🧬 Code graph analysis (1)
packages/nvidia_nat_strands/tests/test_strands_integration.py (2)
src/nat/llm/openai_llm.py (1)
  • OpenAIModelConfig (32-53)
src/nat/llm/nim_llm.py (1)
  • NIMModelConfig (33-55)
🔇 Additional comments (6)
packages/nvidia_nat_strands/tests/test_strands_integration.py (5)

22-22: LGTM!

The os import is required for the new environment-aware fixtures.


144-144: LGTM!

The max_tokens increase to 256 aligns with the PR objective to prevent intermittent test failures, especially for tests involving multiple tool calls.


169-169: LGTM!

The max_tokens increase is appropriate for error handling scenarios where the agent needs to explain errors.


220-220: LGTM!

The max_tokens increase to 256 is consistent with changes in other LLM provider tests and helps prevent intermittent failures.


368-368: LGTM!

The max_tokens increase to 256 is consistent with changes across all LLM provider tests and addresses the intermittent test failure issue mentioned in the PR objectives.

packages/nvidia_nat_strands/pyproject.toml (1)

40-40: No action required — version 1.17 is available and secure.

Version 1.17.0 of strands-agents exists on PyPI and no security vulnerabilities were found. The dependency specification is correct.

Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
@bbednarski9 bbednarski9 added non-breaking Non-breaking change bug Something isn't working labels Nov 20, 2025
@dagardner-nv dagardner-nv self-requested a review November 20, 2025 20:27
@bbednarski9
Copy link
Contributor Author

/ok to test e562ee5

@copy-pr-bot
Copy link

copy-pr-bot bot commented Nov 21, 2025

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.

@dagardner-nv
Copy link
Contributor

/ok to test 0c2b889

@dagardner-nv
Copy link
Contributor

/merge

@rapids-bot rapids-bot bot merged commit 6624f8d into NVIDIA:develop Nov 21, 2025
16 of 17 checks passed
saglave pushed a commit to snps-scm13/SNPS-NeMo-Agent-Toolkit that referenced this pull request Dec 11, 2025
Bumping up strands-agents to v1.17.0 to properly support "system_prompt_content" parameter in strands.models.openai.OpenAIModel.format_request_messages(). Also bumping up token limit in E2E integration tests from 65/96 to 256 to avoid intermittent errors with simple_calculator integration test.
Closes

- I am familiar with the [Contributing Guidelines](https://github.com/NVIDIA/NeMo-Agent-Toolkit/blob/develop/docs/source/resources/contributing.md).
- We require that all contributors "sign-off" on their commits. This certifies that the contribution is your original work, or you have rights to submit it under the same license, or a compatible license.
  - Any contribution which contains commits that are not Signed-Off will not be accepted.
- When the PR is ready for review, new or existing tests cover these changes.
- When the PR is ready for review, the documentation is up to date with these changes.

* **Dependencies**
  * Updated strands-agents dependency from 1.15 to 1.17

* **Improvements**
  * Increased model token limits in integration tests (up to 256) to allow longer interactions
  * Improved test infrastructure with environment-aware fixtures for conditional integration test execution

<sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub>

Authors:
  - Bryan Bednarski (https://github.com/bbednarski9)

Approvers:
  - David Gardner (https://github.com/dagardner-nv)
  - https://github.com/Salonijain27

URL: NVIDIA#1196
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants