[Custom Endpoints] fileConfig.endpoints.custom array structure not supported in release images (incorrect config) #7799
-
What happened?Describe the bug When attempting to configure a custom endpoint (e.g., Perplexity) via fileConfig.endpoints.custom in librechat.yaml, the application throws a Zod schema validation error if custom is defined as an array (the documented, correct method). Zod validation error:
Version info Relevant config (redacted):
I opened a discussion about it: Additional context At the moment I am unable to build the project from source in my current environment, but I will provide feedback as soon as I am able to test in a fresh environment. Should you require tests or logs from a newly built setup, please let me know and I'll prioritize that. Version Informationghcr.io/danny-avila/librechat-dev-api latest ec732384bd62 3 days ago 1.12GB Steps to Reproduce
What browsers are you seeing the problem on?No response Relevant log output{"level":"error","message":"Invalid custom config file at /app/librechat.yaml:\n{\n "issues": [\n {\n "code": "invalid_type",\n "expected": "object",\n "received": "array",\n "path": [\n "fileConfig",\n "endpoints",\n "custom"\n ],\n "message": "Expected object, received array"\n }\n ],\n "name": "ZodError"\n}"} ScreenshotsNo response Code of Conduct
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi @youvnor You are confusing the endpoints config with the They are slightly different in schema, but serve very different purposes. You do not define custom endpoints under Here's a working YAML file using both, note the distinctions. endpoints:
custom:
- name: "Perplexity"
apiKey: "${PERPLEXITY_API_KEY}"
baseURL: "https://api.perplexity.ai/"
models:
default:
- "sonar-reasoning-pro"
- "sonar-reasoning"
- "sonar-pro"
- "sonar"
fetch: false
titleConvo: true
titleModel: "current_model"
forcePrompt: false
titleMessageRole: "user"
modelDisplayLabel: "Perplexity"
dropParams: ["stop", "user", "frequency_penalty", "presence_penalty"]
fileConfig:
endpoints:
default:
fileLimit: 5
fileSizeLimit: 1024
totalSizeLimit: 10240
supportedMimeTypes:
- "image/.*"
- "text/.*"
- "application/.*"
- "application/x-sh"
custom:
fileLimit: 2
fileSizeLimit: 1024 # Maximum size for an individual file in MB
totalSizeLimit: 10240 # Maximum total size for all files in a single request in MB
supportedMimeTypes:
- "text/.*"
- "application/.*"
- "application/x-sh" |
Beta Was this translation helpful? Give feedback.
-
thank you Danny. i can write something for the docs if you want. |
Beta Was this translation helpful? Give feedback.
Hi @youvnor
You are confusing the endpoints config with the
fileConfig
object structure.They are slightly different in schema, but serve very different purposes. You do not define custom endpoints under
fileConfig
.Here's a working YAML file using both, note the distinctions.
fileConfig
is for setting file parameters (and note that it only supports defining blanket settings tocustom
instead of individual custom endpoints, i.e.Perplexity