惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

U
Unit 42
Google DeepMind News
Google DeepMind News
Stack Overflow Blog
Stack Overflow Blog
H
Help Net Security
MongoDB | Blog
MongoDB | Blog
I
InfoQ
N
Netflix TechBlog - Medium
T
Tailwind CSS Blog
量子位
博客园 - 叶小钗
月光博客
月光博客
IT之家
IT之家
G
Google Developers Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
小众软件
小众软件
S
SegmentFault 最新的问题
Engineering at Meta
Engineering at Meta
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
aimingoo的专栏
aimingoo的专栏
云风的 BLOG
云风的 BLOG
Vercel News
Vercel News
爱范儿
爱范儿
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
宝玉的分享
宝玉的分享

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(cli): report Gemini CLI runtime auth status (#86544) ...
giodl73-repo · 2026-06-16 · via Recent Commits to openclaw:main

@@ -28,6 +28,7 @@ import {

2828

resolveProviderEnvAuthLookupMaps,

2929

} from "../../agents/model-auth-env-vars.js";

3030

import { resolveEnvApiKey, resolveUsableCustomProviderApiKey } from "../../agents/model-auth.js";

31+

import { resolveCliRuntimeExecutionProvider } from "../../agents/model-runtime-aliases.js";

3132

import {

3233

buildModelAliasIndex,

3334

isCliProvider,

@@ -361,12 +362,17 @@ export async function modelsStatusCommand(

361362

})?.ref;

362363

};

363364

const providersFromModels = new Set<string>();

364-

const providerUses: Array<{ provider: string; allowCodexRuntimeFallback: boolean }> = [];

365+

const providerUses: Array<{

366+

provider: string;

367+

model: string;

368+

allowCodexRuntimeFallback: boolean;

369+

}> = [];

365370

const addProviderUse = (raw: string | undefined, allowCodexRuntimeFallback: boolean) => {

366371

const ref = resolveStatusModelRef(raw);

367372

if (ref?.provider) {

368373

providerUses.push({

369374

provider: normalizeProviderId(ref.provider),

375+

model: ref.model,

370376

allowCodexRuntimeFallback,

371377

});

372378

}

@@ -416,13 +422,36 @@ export async function modelsStatusCommand(

416422

}).map((provider) => normalizeProviderId(provider)),

417423

);

418424

const syntheticAuthByProvider = new Map<string, StatusSyntheticAuth>();

425+

const cliRuntimeAuthUsages = providerUses

426+

.filter((usage) => usage.allowCodexRuntimeFallback)

427+

.map((usage) => {

428+

const runtimeProvider = resolveCliRuntimeExecutionProvider({

429+

provider: usage.provider,

430+

modelId: usage.model,

431+

cfg,

432+

agentId: workspaceAgentId,

433+

});

434+

const normalizedRuntime = runtimeProvider

435+

? normalizeProviderId(runtimeProvider)

436+

: undefined;

437+

return normalizedRuntime && normalizedRuntime !== usage.provider

438+

? {

439+

provider: usage.provider,

440+

model: usage.model,

441+

allowCodexRuntimeFallback: usage.allowCodexRuntimeFallback,

442+

runtime: normalizedRuntime,

443+

}

444+

: undefined;

445+

})

446+

.filter((usage): usage is NonNullable<typeof usage> => Boolean(usage));

419447420448

const providers = Array.from(

421449

new Set([

422450

...providersFromStore,

423451

...providersFromConfig,

424452

...providersFromModels,

425453

...providersFromEnv,

454+

...cliRuntimeAuthUsages.map((usage) => usage.runtime),

426455

]),

427456

)

428457

.map((p) => normalizeOptionalString(p) ?? "")

@@ -696,25 +725,41 @@ export async function modelsStatusCommand(

696725

}

697726

return false;

698727

};

728+

const hasUsableDirectProviderAuth = (provider: string): boolean => {

729+

const normalized = normalizeProviderId(provider);

730+

const hasUsableProfile = listProviderProfileCandidates(normalized).some((profileId) => {

731+

const credential = store.profiles[profileId];

732+

return credential ? hasUsableAuthProfile(profileId, credential) : false;

733+

});

734+

return hasUsableProfile || hasUsableNonProfileAuth(normalized);

735+

};

699736

const hasUsableProviderAuth = (

700737

provider: string,

701738

options?: { includeLegacyOpenAICodex?: boolean },

702739

): boolean => {

703740

for (const candidate of listRuntimeAuthProviderCandidates(provider, options)) {

704-

const hasUsableProfile = listProviderProfileCandidates(candidate).some((profileId) => {

705-

const credential = store.profiles[profileId];

706-

return credential ? hasUsableAuthProfile(profileId, credential) : false;

707-

});

708-

if (hasUsableProfile || hasUsableNonProfileAuth(candidate)) {

741+

if (hasUsableDirectProviderAuth(candidate)) {

709742

return true;

710743

}

711744

}

712745

return false;

713746

};

747+

const resolveCliRuntimeAuthProvider = (usage: (typeof providerUses)[number]) =>

748+

cliRuntimeAuthUsages.find(

749+

(candidate) =>

750+

candidate.provider === usage.provider &&

751+

candidate.model === usage.model &&

752+

candidate.allowCodexRuntimeFallback === usage.allowCodexRuntimeFallback,

753+

)?.runtime;

714754

const hasUsableAuthForProviderInUse = (

715-

provider: string,

755+

usage: (typeof providerUses)[number],

716756

options: { allowCodexRuntimeFallback: boolean },

717757

): boolean => {

758+

const cliRuntimeAuthProvider = resolveCliRuntimeAuthProvider(usage);

759+

if (cliRuntimeAuthProvider) {

760+

return hasUsableDirectProviderAuth(cliRuntimeAuthProvider);

761+

}

762+

const { provider } = usage;

718763

if (hasUsableProviderAuth(provider)) {

719764

return true;

720765

}

@@ -727,8 +772,8 @@ export async function modelsStatusCommand(

727772

);

728773

};

729774

const runtimeAuthRoutes = Array.from(

730-

new Map(

731-

codexRuntimeAuthUsages.map((usage) => {

775+

new Map([

776+

...codexRuntimeAuthUsages.map((usage) => {

732777

const effective = resolveRuntimeAuthRouteEffective(codexProvider);

733778

return [

734779

`${usage.provider}:codex:${codexProvider}`,

@@ -745,21 +790,38 @@ export async function modelsStatusCommand(

745790

},

746791

] as const;

747792

}),

748-

).values(),

793+

...cliRuntimeAuthUsages.map((usage) => {

794+

const effective = resolveRuntimeAuthRouteEffective(usage.runtime);

795+

return [

796+

`${usage.provider}:${usage.runtime}:${usage.runtime}`,

797+

{

798+

provider: usage.provider,

799+

runtime: usage.runtime,

800+

authProvider: usage.runtime,

801+

status: hasUsableDirectProviderAuth(usage.runtime) ? "usable" : "missing",

802+

effective,

803+

},

804+

] as const;

805+

}),

806+

]).values(),

749807

).toSorted((a, b) => a.provider.localeCompare(b.provider));

750808

const missingProvidersInUse = Array.from(

751809

new Set(

752810

providerUses

753811

.filter(

754812

(usage) =>

755-

!hasUsableAuthForProviderInUse(usage.provider, {

813+

!hasUsableAuthForProviderInUse(usage, {

756814

allowCodexRuntimeFallback: usage.allowCodexRuntimeFallback,

757815

}),

758816

)

759-

.map((usage) => usage.provider),

817+

.map((usage) => resolveCliRuntimeAuthProvider(usage) ?? usage.provider),

760818

),

761819

)

762-

.filter((provider) => !isCliProvider(provider, cfg))

820+

.filter(

821+

(provider) =>

822+

!isCliProvider(provider, cfg) ||

823+

cliRuntimeAuthUsages.some((usage) => usage.runtime === provider),

824+

)

763825

.toSorted((a, b) => a.localeCompare(b));

764826765827

const probeProfileIds = (() => {

@@ -891,6 +953,12 @@ export async function modelsStatusCommand(

891953

const checkStatus = (() => {

892954

const providersInUse = new Set<string>();

893955

for (const usage of providerUses) {

956+

const cliRuntimeAuthProvider = resolveCliRuntimeAuthProvider(usage);

957+

if (cliRuntimeAuthProvider) {

958+

providersInUse.add(cliRuntimeAuthProvider);

959+

providersInUse.add(resolveProviderAuthHealthId(cliRuntimeAuthProvider));

960+

continue;

961+

}

894962

providersInUse.add(usage.provider);

895963

providersInUse.add(resolveProviderAuthHealthId(usage.provider));

896964

if (