🤐 fix: Withhold Custom Endpoint Headers for User URLs#13917
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 97d7a1434b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f92b3a291c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
I fixed the custom OpenAI-compatible endpoint path so configured secrets do not reach user-controlled custom endpoint URLs.
getOpenAIConfigreceives configured headers only for admin-trusted/static base URLs.fetchModelscannot send a static configured key to a user-provided base URL.Authorization, env-secret,{{LIBRECHAT_*}}placeholder headers, static API key withholding, model fetch behavior, native Anthropic custom endpoints, and endpoint credential prompts.Change Type
Testing
npx jest src/endpoints/custom/config.spec.ts src/endpoints/custom/initialize.spec.ts src/endpoints/config/models.spec.ts --runInBand --coverage=falsefrompackages/apinpx tsc --noEmit -p packages/api/tsconfig.jsonfrom the repo rootnpm run build:apifrom the repo rootTest Configuration:
Checklist