Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue: Authentication failed (401) for https://api.smith.langchain.com/runs/multipart #1201

Open
leucir opened this issue Nov 9, 2024 · 10 comments

Comments

@leucir
Copy link

leucir commented Nov 9, 2024

Issue you'd like to raise.

When executing invoke() the following error happens:

Failed to multipart ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/multipart. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/multipart', '{"detail":"Using legacy API key. Please generate a new API key."}')trace=2ea67b21-18ee-4c72-9e2e-7630faf2c7a0,id=2ea67b21-18ee-4c72-9e2e-7630faf2c7a0; trace=2ea67b21-18ee-4c72-9e2e-7630faf2c7a0,id=8ec43343-85b0-4043-b2e4-497ceb25f898; trace=2ea67b21-18ee-4c72-9e2e-7630faf2c7a0,id=11243325-4863-4264-9bc8-ff469b9f113b

I've created at least 2 new API keys, but the error persists.

The following environment variables are set:

LANGSMITH_API_KEY="lsv2_pt_nonononononononon"
LANGSMITH_ENDPOINT="https://api.smith.langchain.com"
LANGCHAIN_TRACING_V2="true"
LANGCHAIN_PROJECT="project_bond_101"

To be precise, it worked once, and then failed after that first execution.

pip list | grep lang returns:

langchain                                0.3.7
langchain-community                      0.3.5
langchain-core                           0.3.15
langchain-openai                         0.2.5
langchain-text-splitters                 0.3.2
langgraph                                0.2.45
langgraph-checkpoint                     2.0.2
langgraph-checkpoint-sqlite              2.0.1
langgraph-sdk                            0.1.35
langsmith                                0.1.142

Suggestion:

No response

@dansashalesser
Copy link

I've had the same issue, generated several keys and still not working.

@mingxuan-he
Copy link

same issue here

@sebj84
Copy link

sebj84 commented Nov 23, 2024

Same for me

@sebj84
Copy link

sebj84 commented Nov 23, 2024

It's solved on my side. I had to renew my langsmith API key with no obvious reason (maybe a new feature because the option "service API" seems to be available).
The new format of the key start with "lsv2_"

@dansashalesser
Copy link

@sebj84 I've also created several keys, and even after updating the keys, I'm still getting the error.

@albydeca
Copy link

Same here. Any help appreciated. Tracing project is not created when I click "New Project" in my account. Maybe this could point to the issue

@guapia233
Copy link

@sebj84 Didn't the previous key format also start with "lsv2_"😭I still can't use it to track my projects

@usman-nasim
Copy link

Also facing this issue! 😞

@usman-nasim
Copy link

hey future ai developers!

If you also ran into this issue do follow me as gratitude as I'm about to fix that for you.
The issue is make sure (don't be surprised) you are not properly authenticated. Yes i know you've created multiple api keys to sort this out but have failed.

Go to your dashboard (Langchain) go to tracing create a new project and add the project name as well in you environement

os.environ["LANGCHAIN_API_KEY"] = LANGCHAIN_API_KEY
os.environ["LANGCHAIN_TRACING_V2"] = "true"
os.environ["LANGCHAIN_ENDPOINT"] = "https://api.smith.langchain.com"
os.environ["LANGCHAIN_PROJECT"] = "your project name"

Bingo it gets resolved

@RiturajKulshresth
Copy link

RiturajKulshresth commented Dec 27, 2024

Hey

When you say Dashboard, are you referring to the 'Home' button or the 'Dashboard' button(3rd from top)
image

I tried going to the 'Tracing projects' section (on the top left) and creating a new project. that did not resolve the issue

Does it automatically get resolved after some time @leucir @albydeca @sebj84 @dansashalesser @usman-nasim

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

No branches or pull requests

8 participants