mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-16 16:30:15 +01:00
📄 refactor: Add Provider Fallback for Media Encoding using Client Endpoint (#10656)
Some checks are pending
Docker Dev Branch Images Build / build (Dockerfile, lc-dev, node) (push) Waiting to run
Docker Dev Branch Images Build / build (Dockerfile.multi, lc-dev-api, api-build) (push) Waiting to run
Docker Dev Images Build / build (Dockerfile, librechat-dev, node) (push) Waiting to run
Docker Dev Images Build / build (Dockerfile.multi, librechat-dev-api, api-build) (push) Waiting to run
Sync Locize Translations & Create Translation PR / Sync Translation Keys with Locize (push) Waiting to run
Sync Locize Translations & Create Translation PR / Create Translation PR on Version Published (push) Blocked by required conditions
Some checks are pending
Docker Dev Branch Images Build / build (Dockerfile, lc-dev, node) (push) Waiting to run
Docker Dev Branch Images Build / build (Dockerfile.multi, lc-dev-api, api-build) (push) Waiting to run
Docker Dev Images Build / build (Dockerfile, librechat-dev, node) (push) Waiting to run
Docker Dev Images Build / build (Dockerfile.multi, librechat-dev-api, api-build) (push) Waiting to run
Sync Locize Translations & Create Translation PR / Sync Translation Keys with Locize (push) Waiting to run
Sync Locize Translations & Create Translation PR / Create Translation PR on Version Published (push) Blocked by required conditions
When using direct endpoints (e.g., Google) instead of Agents, `this.options.agent` is undefined, causing provider detection to fail. This resulted in "Unknown content type document" errors for Google/Gemini PDF uploads. Added `?? this.options.endpoint` fallback in addDocuments(), addVideos(), and addAudios() methods to ensure correct provider detection for all endpoint types.
This commit is contained in:
parent
8b7af65265
commit
5b8f0cba04
1 changed files with 6 additions and 6 deletions
|
|
@ -1213,8 +1213,8 @@ class BaseClient {
|
||||||
this.options.req,
|
this.options.req,
|
||||||
attachments,
|
attachments,
|
||||||
{
|
{
|
||||||
provider: this.options.agent?.provider,
|
provider: this.options.agent?.provider ?? this.options.endpoint,
|
||||||
endpoint: this.options.agent?.endpoint,
|
endpoint: this.options.agent?.endpoint ?? this.options.endpoint,
|
||||||
useResponsesApi: this.options.agent?.model_parameters?.useResponsesApi,
|
useResponsesApi: this.options.agent?.model_parameters?.useResponsesApi,
|
||||||
},
|
},
|
||||||
getStrategyFunctions,
|
getStrategyFunctions,
|
||||||
|
|
@ -1231,8 +1231,8 @@ class BaseClient {
|
||||||
this.options.req,
|
this.options.req,
|
||||||
attachments,
|
attachments,
|
||||||
{
|
{
|
||||||
provider: this.options.agent?.provider,
|
provider: this.options.agent?.provider ?? this.options.endpoint,
|
||||||
endpoint: this.options.agent?.endpoint,
|
endpoint: this.options.agent?.endpoint ?? this.options.endpoint,
|
||||||
},
|
},
|
||||||
getStrategyFunctions,
|
getStrategyFunctions,
|
||||||
);
|
);
|
||||||
|
|
@ -1246,8 +1246,8 @@ class BaseClient {
|
||||||
this.options.req,
|
this.options.req,
|
||||||
attachments,
|
attachments,
|
||||||
{
|
{
|
||||||
provider: this.options.agent?.provider,
|
provider: this.options.agent?.provider ?? this.options.endpoint,
|
||||||
endpoint: this.options.agent?.endpoint,
|
endpoint: this.options.agent?.endpoint ?? this.options.endpoint,
|
||||||
},
|
},
|
||||||
getStrategyFunctions,
|
getStrategyFunctions,
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue