Skip to content

test(llm): move call tests to module mirrors - #2265

Merged
Pouyanpi merged 1 commit into
developfrom
pouyanpi/refactor-llm-call-tests
Aug 17, 2026
Merged

test(llm): move call tests to module mirrors#2265
Pouyanpi merged 1 commit into
developfrom
pouyanpi/refactor-llm-call-tests

Conversation

@Pouyanpi

@Pouyanpi Pouyanpi commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

Moves llm.call tests into module-aligned files; no runtime changes.

Related: follow-up to #2241.

AI Assistance

  • AI tools were used; a human reviewed and can explain every change (tool: Codex).

Stack Position

Part 1 of 2.

Stack Context

Moves llm_call tests first so the NGUARD-880 fix is reviewed as a small behavioral diff.

Please review each PR against its parent branch, not directly against the root base branch, except for part 1.

Order PR Branch Base
1 #2265 pouyanpi/refactor-llm-call-tests develop
2 #2266 pouyanpi/fix-nguard-880-stop-and-messages pouyanpi/refactor-llm-call-tests

Validation

593 passed, 25 skipped
pre-commit passed

Summary by CodeRabbit

  • Tests
    • Added integration coverage for LangChain provider detection, including wrapped, nested, unknown, and multiple-inheritance models.
    • Added tests for forwarding stop tokens and parameters, excluding empty values.
    • Added exception-handling tests that verify model and provider details are included.
    • Simplified existing reasoning tests without changing their behavior.

@github-actions github-actions Bot added status: needs triage New issues that have not yet been reviewed or categorized. size: M labels Aug 7, 2026
@Pouyanpi
Pouyanpi marked this pull request as ready for review August 7, 2026 15:19
@Pouyanpi Pouyanpi added status: triaged Triaged by a maintainer; eligible for automated review (CodeRabbit/Greptile). and removed status: needs triage New issues that have not yet been reviewed or categorized. labels Aug 7, 2026
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 937c1f88-d228-4ad4-9f3f-5cad3e82a23a

📥 Commits

Reviewing files that changed from the base of the PR and between f5900d1 and 47e0793.

📒 Files selected for processing (3)
  • tests/integrations/langchain/test_langchain_llm_adapter.py
  • tests/llm/test_call.py
  • tests/llm/test_call_reasoning.py
💤 Files with no reviewable changes (1)
  • tests/llm/test_call.py

📝 Walkthrough

Walkthrough

The change consolidates LangChain adapter integration tests, removes duplicated adapter coverage from test_call.py, and centralizes the llm_call import in reasoning tests.

Changes

LLM adapter test coverage

Layer / File(s) Summary
Add LangChain adapter integration coverage
tests/integrations/langchain/test_langchain_llm_adapter.py
Adds provider inference tests for known, unknown, wrapped, inherited, and nested LLM classes. Adds tests for parameter forwarding, stop-token binding, and enriched exceptions.
Remove duplicated adapter tests
tests/llm/test_call.py
Removes adapter imports, provider fixtures, provider inference tests, and adapter-specific llm_call tests.
Centralize reasoning test imports
tests/llm/test_call_reasoning.py
Moves the llm_call import to module scope and removes repeated local imports.

Estimated code review effort: 2 (Simple) | ~15 minutes

Possibly related PRs

  • NVIDIA-NeMo/Guardrails#2241: Both changes modify llm_call tests; this change relocates adapter coverage while #2241 refactors implementation and import paths.
🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: moving llm.call tests into module-aligned files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Test Results For Major Changes ✅ Passed The diff changes only test files and primarily moves tests; the PR description documents validation with 593 passed and 25 skipped.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch pouyanpi/refactor-llm-call-tests

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

@greptile-apps

greptile-apps Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR reorganizes existing llm_call tests into module-aligned test files without changing production behavior.

  • Moves shared LLM call tests into tests/llm/.
  • Relocates LangChain-specific provider, parameter-forwarding, and exception tests into the LangChain adapter suite.
  • Updates reasoning tests to import the shared llm_call boundary directly.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
tests/integrations/langchain/test_langchain_llm_adapter.py Consolidates LangChain-specific provider inference, argument forwarding, and exception-enrichment tests with the adapter tests.
tests/llm/test_call.py Renames and narrows the former action utility test module to shared LLM call behavior.
tests/llm/test_call_reasoning.py Moves reasoning extraction tests under the LLM module mirror and switches integration cases to the canonical call import.

Reviews (2): Last reviewed commit: "test(llm): move call tests to module mir..." | Re-trigger Greptile

Signed-off-by: Pouyanpi <13303554+Pouyanpi@users.noreply.github.com>
@Pouyanpi
Pouyanpi force-pushed the pouyanpi/refactor-llm-call-tests branch from 47e0793 to a7e1197 Compare August 17, 2026 08:36
@Pouyanpi
Pouyanpi merged commit 47d145a into develop Aug 17, 2026
17 checks passed
@Pouyanpi
Pouyanpi deleted the pouyanpi/refactor-llm-call-tests branch August 17, 2026 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: M status: triaged Triaged by a maintainer; eligible for automated review (CodeRabbit/Greptile).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant