Skip to content

fix(auth): preserve custom:<subname> in credential pool lookup (fixes #29872) - #29893

Closed
vanhci wants to merge 4 commits into
NousResearch:mainfrom
vanhci:fix/issue-29872
Closed

fix(auth): preserve custom:<subname> in credential pool lookup (fixes #29872)#29893
vanhci wants to merge 4 commits into
NousResearch:mainfrom
vanhci:fix/issue-29872

Conversation

@vanhci

@vanhci vanhci commented May 21, 2026

Copy link
Copy Markdown

Summary

Fixes issue #29872 where provider: custom:<subname> (e.g. custom:bobapi-deepseek) in model_aliases would lose the sub-name during credential pool lookup, causing wrong credentials to be picked when multiple custom providers share the same base_url.

Root Cause

In _resolve_named_custom_runtime() at line 638, the pool lookup was called with provider_name=None for the bare-custom path, falling back to url-only matching instead of name-based matching.

Fix

Extract the sub-name from requested_provider (e.g. bobapi-deepseek from custom:bobapi-deepseek) and pass it to _try_resolve_from_custom_pool() so the credential pool lookup can use name-based matching.

Testing

After this fix, provider=custom:bobapi-deepseek will correctly look up the custom:bobapi-deepseek pool key instead of falling back to url-only matching.

Closes #29872

Vanhci and others added 4 commits May 21, 2026 15:08
On Windows, subprocess.Popen spawned the Node.js WhatsApp bridge without
creationflags, causing a visible blank node.exe console window to appear.
The window has no useful output (stdout/stderr already go to bridge.log)
and closing it causes the bridge to exit with status 0xC000013A, triggering
the reconnection watcher loop.

Fix: pass creationflags=windows_hide_flags() on Windows, the same pattern
already used in cron/scheduler.py for the same reason.

Fixes #29715
Fixes #29750 — Traditional Chinese language option showed the Taiwan
flag (tw) instead of the PRC five-star red flag (cn). Both Simplified
and Traditional Chinese now correctly display the PRC flag, matching
the dashboard language selector consistency expectation.
@alt-glitch alt-glitch added area/auth Authentication, OAuth, credential pools type/bug Something isn't working P2 Medium — degraded but workaround exists labels May 21, 2026
Comment thread web/src/i18n/context.tsx
en: { name: "English", flagCountryCode: "gb" },
zh: { name: "简体中文", flagCountryCode: "cn" },
"zh-hant": { name: "繁體中文", flagCountryCode: "tw" },
"zh-hant": { name: "繁體中文", flagCountryCode: "cn" },

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change doesn't seem to be related to the rest of the PR.

@toxuin toxuin left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be addressing several issues at once. I would recommend splitting it into individual PRs.
Description clearly states changes/fix to auth only, failing to mention other changes (cosmetic flag change, new _is_windows platform condition).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/auth Authentication, OAuth, credential pools P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: model_aliases provider: custom:<subname> normalized to bare 'custom', wrong API key picked from pool

3 participants