Skip to content

Conversation

@Pouyanpi
Copy link
Collaborator

Description

Reverts commit aafd733 (PR #1461). Custom HTTP headers support is now implemented in langchain-nvidia-ai-endpoints v0.3.19, making this patch redundant (see release notes).

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Nov 18, 2025

Greptile Summary

  • Reverts custom HTTP headers patch (commit aafd733) as functionality now available in langchain-nvidia-ai-endpoints v0.3.19
  • Removes custom_headers field, __init__ override, and client method wrapping from ChatNVIDIA patch class
  • Deletes 458-line test file test_langchain_nvidia_custom_headers.py containing comprehensive test coverage

Confidence Score: 4/5

  • Safe to merge pending dependency version update
  • Clean revert that properly removes all custom headers code, but poetry.lock still at v0.3.16 while upstream feature requires v0.3.19 - should verify dependency update
  • Verify poetry.lock is updated to langchain-nvidia-ai-endpoints >= 0.3.19 before merging

Important Files Changed

Filename Overview
nemoguardrails/llm/providers/_langchain_nvidia_ai_endpoints_patch.py Reverted custom HTTP headers patch - removed custom_headers field, __init__ override, and _wrap_client_methods, restoring to original streaming-only patch
tests/llm_providers/test_langchain_nvidia_custom_headers.py Deleted entire test file (458 lines) covering custom headers functionality - no longer needed as feature moved upstream

Sequence Diagram

sequenceDiagram
    participant Developer
    participant PR
    participant CodeReview
    Developer->>PR: "Create revert PR #1503"
    Developer->>PR: "Remove custom_headers field from ChatNVIDIA"
    Developer->>PR: "Remove __init__ and _wrap_client_methods"
    Developer->>PR: "Delete test_langchain_nvidia_custom_headers.py"
    Developer->>PR: "Reference langchain-nvidia-ai-endpoints v0.3.19"
    PR->>CodeReview: "Submit for review"
    CodeReview->>Developer: "Verify upstream implementation exists"
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

2 files reviewed, no comments

Edit Code Review Agent Settings | Greptile
React with 👍 or 👎 to share your feedback on this new summary format

Copy link
Collaborator

@tgasser-nv tgasser-nv left a comment

Choose a reason for hiding this comment

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

Looks good, I guess we need to make sure consumers of the toolkit use the default_headers field rather than custom_headers or it wouldn't work?

For some reason the code-coverage check is failing, I think it's a transient issue though

@Pouyanpi Pouyanpi added this to the v0.19.0 milestone Nov 19, 2025
@codecov
Copy link

codecov bot commented Nov 19, 2025

Codecov Report

❌ Patch coverage is 20.00000% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
.../providers/_langchain_nvidia_ai_endpoints_patch.py 20.00% 4 Missing ⚠️

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants