When executing invoke()
the following error happens:
Errno 401 Client Error: Unauthorized for url: ] {"detail":"Using legacy API key. Please generate a new API key."}
I've created several API keys (yes, the new ones with the lsv2_pt bit), but am still getting an error.
The weird thing is we have another API key that's being used regularly for other tasks, and it works fine on a different machine, but when testing it with invoke()
and prompt.push()
, it won't work as well.
These are the environment variables I have set:
os.environ["LANGCHAIN_API_KEY"] = 'lsv2_pt_000000000000'
os.environ["LANGCHAIN_HUB_API_KEY"] = 'lsv2_pt_000000000000'
os.environ["LANGCHAIN_TRACING_V2"] = "true"
os.environ["LANGCHAIN_ENDPOINT"] = ";
pip list | grep lang
returns:
google-ai-generativelanguage 0.4.0
langchain 0.3.7
langchain-benchmarks 0.0.14
langchain-community 0.0.38
langchain-core 0.3.19
langchain-google-genai 0.0.9
langchain-openai 0.2.9
langchain-text-splitters 0.3.2
langchainhub 0.1.15
langsmith 0.1.129
I'm at a loss here. Any help will be appreciated!