mirror of
https://github.com/vxcontrol/pentagi.git
synced 2026-07-20 12:37:04 -04:00
[GH-ISSUE #220] [Bug]: User-defined Qwen provider is ignored when name matches built-in provider #82
Reference in New Issue
Block a user
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?
Originally created by @jtomkh2-dot on GitHub (Mar 20, 2026).
Original GitHub issue: https://github.com/vxcontrol/pentagi/issues/220
Originally assigned to: @asdek on GitHub.
Affected Component
AI Agents (Researcher/Developer/...)
Describe the bug
When creating a user-defined Qwen provider in Settings > Providers with the name "qwen", the default embedded
provider takes precedence over the user-defined one. The GetProvider() function in providers.go uses a switch
statement that matches all built-in provider names first, including "qwen", before checking the database. This
means user-defined providers with names matching built-in providers are never used.
Steps to Reproduce
QWEN_API_KEYin.envExpected Behavior
User-defined providers should take precedence over default/embedded providers when names match.
Code Location
pentagi/backend/pkg/providers/providers.goGetProvider()at line 677DefaultProviderNameQwenbefore checking the database at line 707Current Logic (Bug)
System Configuration
PentAGI Version:1.2.0
docker Version: 27.5.1+dfsg4
Docker Compose version 2.32.4-3
Logs and Artifacts
No response
Screenshots or Recordings
No response
Verification
@JasonOA888 commented on GitHub (Mar 22, 2026):
I checked the current
mainbranch. The fix has already been applied in commite05062e(PR #222).The
GetProviderfunction now checks user-defined providers first, then falls back to default providers. This matches the expected behavior - user-defined providers take precedence over built-in defaults.This issue can probably be closed.
@asdek commented on GitHub (Mar 22, 2026):
hey @JasonOA888 @jtomkh2-dot
@JasonOA888 you are right it should be expected behavior after the latest changes
@jtomkh2-dot could you update the product and check it on the your installation?
docker compose pull && docker compose up -d