mirror of
https://github.com/farcasclaudiu/openclaw.git
synced 2026-06-29 07:01:40 +03:00
fix: report auth label from configured order
This commit is contained in:
@@ -219,16 +219,13 @@ function resolveModelAuthLabel(
|
|||||||
const providerKey = normalizeProviderId(resolved);
|
const providerKey = normalizeProviderId(resolved);
|
||||||
const store = ensureAuthProfileStore();
|
const store = ensureAuthProfileStore();
|
||||||
const profileOverride = sessionEntry?.authProfileOverride?.trim();
|
const profileOverride = sessionEntry?.authProfileOverride?.trim();
|
||||||
const lastGood = store.lastGood?.[providerKey] ?? store.lastGood?.[resolved];
|
|
||||||
const order = resolveAuthProfileOrder({
|
const order = resolveAuthProfileOrder({
|
||||||
cfg,
|
cfg,
|
||||||
store,
|
store,
|
||||||
provider: providerKey,
|
provider: providerKey,
|
||||||
preferredProfile: profileOverride,
|
preferredProfile: profileOverride,
|
||||||
});
|
});
|
||||||
const candidates = [profileOverride, lastGood, ...order].filter(
|
const candidates = [profileOverride, ...order].filter(Boolean) as string[];
|
||||||
Boolean,
|
|
||||||
) as string[];
|
|
||||||
|
|
||||||
for (const profileId of candidates) {
|
for (const profileId of candidates) {
|
||||||
const profile = store.profiles[profileId];
|
const profile = store.profiles[profileId];
|
||||||
|
|||||||
Reference in New Issue
Block a user