[GH-ISSUE #3767] [langchain]: pydantic_core._pydantic_core.ValidationError: 1 validation error for HuggingFaceEndpointEmbeddings #2762

Open
opened 2026-06-05 17:26:39 -04:00 by yindo · 2 comments
Owner

Originally created by @a544844 on GitHub (Apr 28, 2026).
Original GitHub issue: https://github.com/langchain-ai/docs/issues/3767

Type of issue

issue / bug

Language

Python

Description

pydantic_core._pydantic_core.ValidationError: 1 validation error for HuggingFaceEndpointEmbeddings
Value error, model must be a HuggingFace repo ID, not a URL. [type=value_error, input_value={'model': 'http://localhost:8081'}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.13/v/value_error
in Text embeddings inference integration https://docs.langchain.com/oss/python/integrations/embeddings/text_embeddings_inference
embeddings = HuggingFaceEndpointEmbeddings(model="http://localhost:8080")

Originally created by @a544844 on GitHub (Apr 28, 2026). Original GitHub issue: https://github.com/langchain-ai/docs/issues/3767 ### Type of issue issue / bug ### Language Python ### Description pydantic_core._pydantic_core.ValidationError: 1 validation error for HuggingFaceEndpointEmbeddings Value error, `model` must be a HuggingFace repo ID, not a URL. [type=value_error, input_value={'model': 'http://localhost:8081'}, input_type=dict] For further information visit https://errors.pydantic.dev/2.13/v/value_error in Text embeddings inference integration https://docs.langchain.com/oss/python/integrations/embeddings/text_embeddings_inference embeddings = HuggingFaceEndpointEmbeddings(model="http://localhost:8080")
yindo added the langchainexternal labels 2026-06-05 17:26:39 -04:00
Author
Owner

@vivek41-glitch commented on GitHub (May 3, 2026):

Hi! I'm a Python/AI developer with hands-on experience using HuggingFace embeddings and LangChain integrations. I've reproduced this issue — the documentation example passes a URL to the model parameter which should be a HuggingFace repo ID. I'd love to fix the docs example. Could I be assigned? Thank you!

<!-- gh-comment-id:4365628807 --> @vivek41-glitch commented on GitHub (May 3, 2026): Hi! I'm a Python/AI developer with hands-on experience using HuggingFace embeddings and LangChain integrations. I've reproduced this issue — the documentation example passes a URL to the model parameter which should be a HuggingFace repo ID. I'd love to fix the docs example. Could I be assigned? Thank you!
Author
Owner

@geligegege commented on GitHub (May 14, 2026):

Hello, I also ran into the same issue. Fortunately, I solved this bug by downgrading the version. Hope this helps you.

<!-- gh-comment-id:4452534620 --> @geligegege commented on GitHub (May 14, 2026): Hello, I also ran into the same issue. Fortunately, I solved this bug by downgrading the version. Hope this helps you.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/docs#2762