langchain - 💡(How to fix) Fix langchain_anthropic does not support set verify=False and cert filepath [3 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
langchain-ai/langchain#35977Fetched 2026-04-08 00:47:44
View on GitHub
Comments
3
Participants
2
Timeline
14
Reactions
0
Timeline (top)
commented ×3labeled ×3mentioned ×3subscribed ×3
RAW_BUFFERClick to expand / collapse

Checked other resources

  • This is a feature request, not a bug report or usage question.
  • I added a clear and descriptive title that summarizes the feature request.
  • I used the GitHub search to find a similar feature request and didn't find it.
  • I checked the LangChain documentation and API reference to see if this feature already exists.
  • This is not related to the langchain-community package.

Package (Required)

  • langchain-anthropic

Feature Description

Here, it does not read the verify attribute from the input parameters. <img width="517" height="541" alt="Image" src="https://github.com/user-attachments/assets/af194787-cee6-4b79-8fc9-3b0c29b4e4bf" />

Use Case

Some environments may require a custom certificate file. I don't want to change the global certificate path, so I want the option to either disable verification or specify a custom certificate path.

extent analysis

Fix Plan

To address the issue, we need to modify the langchain-anthropic package to accept a verify attribute from input parameters. This will allow users to either disable verification or specify a custom certificate path.

Code Changes

Here are the concrete steps:

  • Modify the function that makes the request to accept a verify parameter:
import requests

def make_request(url, params, verify=True):
    # ...
    response = requests.get(url, params=params, verify=verify)
    # ...
  • Add a check to see if a custom certificate path is provided:
if isinstance(verify, str):
    # Use the custom certificate path
    response = requests.get(url, params=params, verify=verify)
else:
    # Use the default verification behavior
    response = requests.get(url, params=params, verify=verify)
  • Update the function to accept the verify attribute from input parameters:
def my_function(input_params):
    verify = input_params.get('verify')
    # ...
    make_request(url, params, verify=verify)

Verification

To verify that the fix worked, you can test the function with different verify values:

  • verify=True should use the default verification behavior
  • verify=False should disable verification
  • verify='/path/to/custom/cert' should use the custom certificate path

Example Use Case

Here's an example of how to use the updated function:

input_params = {'verify': '/path/to/custom/cert'}
my_function(input_params)

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

langchain - 💡(How to fix) Fix langchain_anthropic does not support set verify=False and cert filepath [3 comments, 2 participants]