@@ -14,7 +14,6 @@ import {
1414 resolveInheritedToolPolicyForSession ,
1515 resolveSubagentToolPolicyForSession ,
1616} from "../pi-tools.policy.js" ;
17- import { normalizeProviderId } from "../provider-id.js" ;
1817import { resolveSandboxRuntimeStatus } from "../sandbox/runtime-status.js" ;
1918import { resolveSenderToolPolicy } from "../sender-tool-policy.js" ;
2019import {
@@ -61,9 +60,9 @@ type AgentHarnessSelectionDecision = {
6160 | "forced_plugin"
6261 // Implicit Codex preference found no registered Codex harness, so PI handled the run.
6362 | "implicit_plugin_unavailable_pi"
64- // Explicit CLI runtime alias or configured cliBackends id has no agent harness
65- // plugin counterpart. PI is returned as the transcript-composition placeholder;
66- // the actual run is routed through CLI dispatch by callers that consult model
63+ // Explicit provider-owned CLI runtime aliases have no agent harness plugin
64+ // counterpart. PI is returned as the transcript-composition placeholder; the
65+ // actual run is routed through CLI dispatch by callers that consult model
6766 // runtime policy (see `assertModelFallbackCandidateHarnessAvailable`).
6867 | "cli_runtime_passthrough_pi"
6968 // Auto mode chose a registered plugin harness that supports the provider/model.
@@ -77,13 +76,6 @@ function listPluginAgentHarnesses(): AgentHarness[] {
7776 return listRegisteredAgentHarnesses ( ) . map ( ( entry ) => entry . harness ) ;
7877}
7978
80- function hasConfiguredCliBackendId ( runtime : string , config : OpenClawConfig | undefined ) : boolean {
81- const configured = config ?. agents ?. defaults ?. cliBackends ?? { } ;
82- return Object . keys ( configured ) . some (
83- ( key ) => normalizeProviderId ( key ) === normalizeProviderId ( runtime ) ,
84- ) ;
85- }
86-
8779export function resolveAvailableAgentHarnessPolicy ( params : {
8880 provider ?: string ;
8981 modelId ?: string ;
@@ -185,10 +177,7 @@ function selectAgentHarnessDecision(params: {
185177 candidates : listHarnessCandidates ( pluginHarnesses ) ,
186178 } ) ;
187179 }
188- if (
189- isCliRuntimeAliasForProvider ( { runtime, provider : params . provider } ) ||
190- hasConfiguredCliBackendId ( runtime , params . config )
191- ) {
180+ if ( isCliRuntimeAliasForProvider ( { runtime, provider : params . provider } ) ) {
192181 return buildSelectionDecision ( {
193182 harness : piHarness ,
194183 policy : {
0 commit comments