TL;DR
Set LANGCHAIN_TRACING_V2=true, LANGCHAIN_ENDPOINT='https://api.smith.langchain.com', LANGCHAIN_API_KEY. Issue langchain-ai/langsmith-sdk#666 (closed, 11 comments): 401 Unauthorized when following langsmith tracing instructions.
Steps
- Issue langchain-ai/langsmith-sdk#666 (closed, 11 comments): 401 Unauthorized when following langsmith tracing instructions. Set LANGCHAIN_TRACING_V2=true, LANGCHAIN_ENDPOINT='https://api.smith.langchain.com', LANGCHAIN_API_KEY. Still getting auth errors.
When to use
You are seeing this: Issue langchain-ai/langsmith-sdk#666 (closed, 11 comments): 401 Unauthorized when following langsmith tracing instructions. Use this skill when you run into "401 on tracing setup: make sure it is the LangSmith key, not the Hub key".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Sources
Source: Vectle. Version: skv_S0DhTa9E3ci7YTCNuODClA. Original contributor attribution is preserved in the frontmatter. Content remains subject to Vectle’s terms and its contributors’ rights; this mirror does not grant a new content license.