mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2026-04-25 00:36:08 +03:00
[PR #1544] [CLOSED] Fix custom endpoint configuration for AI chat title generation #1333
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#1333
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?
📋 Pull Request Information
Original PR: https://github.com/0xJacky/nginx-ui/pull/1544
Author: @Copilot
Created: 2/6/2026
Status: ❌ Closed
Base:
dev← Head:copilot/fix-ai-chat-title-error📝 Commits (3)
19147b9Initial plan9c512f2Fix AI chat title generation to use configured custom endpointcec675bComplete fix for AI chat title generation endpoint configuration📊 Changes
2 files changed (+30 additions, -365 deletions)
View changed files
📝
go.sum(+26 -361)📝
internal/llm/client.go(+4 -4)📄 Description
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.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.