mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2026-04-25 08:45:58 +03:00
[PR #1544] Fix custom endpoint configuration for AI chat title generation #5764
Labels
No labels
Q/A
bug
casdoor
dependencies
docker
documentation
duplicate
enhancement
help wanted
invalid
lego
platform:openwrt
platform:windows
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-ui#5764
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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?
Original Pull Request: https://github.com/0xJacky/nginx-ui/pull/1544
State: closed
Merged: No
Title generation was hitting OpenAI's default endpoint instead of the configured custom endpoint, causing 403 errors for users in restricted regions or using alternative LLM providers.
Changes
internal/llm/client.goTechnical Details
The BaseUrl was being set after both config initializations, making the logic unclear. For non-Azure configs (custom endpoints, proxies, compatible providers like Ollama/vLLM), the BaseUrl must override the default OpenAI URL.
Before:
After:
This ensures title generation and chat completion both respect the configured custom endpoint.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.