mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-22 01:55:27 -04:00
400 Client Error: Bad Request when using open ai compatible embedding provider. #19
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ritamariavermelho06 on GitHub (Feb 25, 2025).
Self Checks
Dify version
0.15.2
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url.
✔️ Expected Behavior
Upload completed successfully and vectorized document.
❌ Actual Behavior
No response
@crazywoola commented on GitHub (Feb 25, 2025):
I think we need more details to investigate, such as the mode;'s name, and where did you get this model.
@dosubot[bot] commented on GitHub (Feb 25, 2025):
Hey @ritamariavermelho06! 👋 I'm here to help you out with any bugs, questions, or contributions you have in mind. I'm a bot designed to assist you while you wait for a human maintainer.
I found some relevant information that might help you troubleshoot the 400 Bad Request error when using an OpenAI-compatible embedding provider in Dify.
Common causes of a 400 Bad Request error in this context include:
Additionally, you might want to check if there are any specific error messages or codes associated with the 400 error, as they can provide more insight into the issue [2].
If these suggestions don't resolve the issue, you might find it helpful to look at similar discussions, such as the one titled "Error: Response output is missing or does not contain embeddings" [3].
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other
@ritamariavermelho06 commented on GitHub (Feb 25, 2025):
Hello @crazywoola ! I am using the "Titan Text Embeddings V2" model, the model is executed on Bedrock but access is done using Litellm proxy, for that we are using the openai-compativel interface, direct requests to the Litellm endpoint following the OpenAi pattern occur successfully on Postman.
curl --location 'http://x.x.x.x:4000/v1/embeddings?model=bedrock%2Famazon.titan-embed-text-v2&input=teste'
--header 'accept: application/json'
--header 'x-api-key: sk-xxxxxxx
--header 'Content-Type: application/json'
--data '{
"input": "Dify"
}'
Result {"model":"amazon.titan-embed-text-v2:0","data":[{"embedding":[0.003222302533686161,0.007025...........],"index":0,"object":"embedding"}],"object":"list","usage":{"completion_tokens":0,"prompt_tokens":3,"total_tokens":3,"completion_tokens_details":null,"prompt_tokens_details":null}}@dosubot[bot] commented on GitHub (Mar 28, 2025):
Hi, @ritamariavermelho06. I'm Dosu, and I'm helping the Dify team manage their backlog. I'm marking this issue as stale.
Issue Summary:
Next Steps:
Thank you for your understanding and contribution!