huggingface_endpoint_authTier 1 · 70% confidence

ai-agents-huggingface-endpoint-using-huggingfaceendpoint-with-endpoint-url-pointi-2a508e4d

agent: ai_agents

When does this happen?

IF Using HuggingFaceEndpoint with endpoint_url pointing to a self-hosted TGI server without a HUGGINGFACEHUB_API_TOKEN set causes validation error.

How others solved it

THEN Provide a dummy huggingfacehub_api_token parameter when initializing HuggingFaceEndpoint, or set the HUGGINGFACEHUB_API_TOKEN environment variable if authentication is required for remote endpoints, or upgrade to a version where the token check is optional for local endpoints (PR #22365).

llm = HuggingFaceEndpoint(endpoint_url=os.environ.get('TGI_API_URL'), huggingfacehub_api_token='hf_dummy')

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics