


























@@ -18,6 +18,7 @@ import {
1818uiProtocolFreshnessIssueToHealthFinding,
1919uiProtocolFreshnessIssueToRepairEffects,
2020} from "../commands/doctor-ui.js";
21+import { collectDisabledCodexPluginRouteIssues } from "../commands/doctor/shared/codex-route-warnings.js";
2122import type { ConfigValidationIssue, OpenClawConfig } from "../config/types.openclaw.js";
2223import { resolveSecretInputRef, type SecretRef } from "../config/types.secrets.js";
2324import { hasAmbiguousGatewayAuthModeConfig } from "../gateway/auth-mode-policy.js";
@@ -29,6 +30,7 @@ import { registerHealthCheck } from "./health-check-registry.js";
2930import type { HealthCheck, HealthCheckContext, HealthFinding } from "./health-checks.js";
30313132const BROWSER_CLAWD_PROFILE_RESIDUE_CHECK_ID = "core/doctor/browser-clawd-profile-residue";
33+const CODEX_SESSION_ROUTES_CHECK_ID = "core/doctor/codex-session-routes";
3234const FINAL_CONFIG_VALIDATION_CHECK_ID = "core/doctor/final-config-validation";
33353436const loadDoctorCoreChecksRuntimeModule = async () =>
@@ -616,6 +618,37 @@ const legacyWhatsAppCrontabCheck: HealthCheck = {
616618},
617619};
618620621+const codexSessionRoutesCheck: HealthCheck = {
622+id: CODEX_SESSION_ROUTES_CHECK_ID,
623+kind: "core",
624+description: "Codex runtime routes have a registered Codex plugin harness before sessions run.",
625+source: "doctor",
626+async detect(ctx) {
627+return collectDisabledCodexPluginRouteIssues(ctx.cfg).map(
628+(issue): HealthFinding => ({
629+checkId: CODEX_SESSION_ROUTES_CHECK_ID,
630+severity: "warning",
631+message: [
632+`${issue.path} routes ${issue.modelRef} to ${issue.canonicalModel}`,
633+"with Codex runtime, but the Codex plugin is disabled by config.",
634+].join(" "),
635+path: issue.path,
636+target: issue.canonicalModel,
637+requirement: "Codex plugin enabled for routes that use the Codex runtime.",
638+fixHint: issue.blockedOutsideEntry
639+ ? [
640+"Enable plugin loading and remove codex from plugins.deny,",
641+"or set the affected OpenAI models to an OpenClaw runtime policy.",
642+].join(" ")
643+ : [
644+"Run `openclaw doctor --fix`: it enables plugins.entries.codex,",
645+"or set the affected OpenAI models to an OpenClaw runtime policy.",
646+].join(" "),
647+}),
648+);
649+},
650+};
651+619652const gatewayPlatformNotesCheck: HealthCheck = {
620653id: "core/doctor/gateway-services/platform-notes",
621654kind: "core",
@@ -913,6 +946,7 @@ function createConvertedWorkflowChecks(deps: CoreHealthCheckDeps): readonly Heal
913946gatewayAuthCheck,
914947legacyStateCheck,
915948legacyWhatsAppCrontabCheck,
949+codexSessionRoutesCheck,
916950shellCompletionCheck,
917951uiProtocolFreshnessCheck,
918952gatewayPlatformNotesCheck,
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。