Open 18075717849 opened 2 hours ago
The issue you're encountering is due to the base_url
parameter not being explicitly provided in the credentials
dictionary when using load balancing with the Jina model. If base_url
is not included in the credentials
, the code defaults to using self.api_base
, which is set to "https://api.jina.ai/v1"
.
Here's the relevant code snippet:
base_url = credentials.get("base_url", self.api_base)
base_url = base_url.removesuffix("/")
This means that if the credentials
dictionary does not contain a base_url
key, the base_url
will default to "https://api.jina.ai/v1"
[1].
To resolve this issue, ensure that the base_url
parameter is included in the credentials
dictionary when configuring load balancing for the Jina model.
To continue talking to Dosu, mention @dosu.
Logically speaking, the default path should be used if it is not configured. I can configure it successfully when configuring the global model, but when configuring the load balancing, it prompts that base_url is missing.
Self Checks
Dify version
0.8.2
Cloud or Self Hosted
Cloud
Steps to reproduce
Using jina model load balancing, when adding key to save, it prompts that base_url is a required parameter, but it is missing.
✔️ Expected Behavior
What is the problem that causes base_url to be lost?
❌ Actual Behavior
What is the problem that causes base_url to be lost?