Skip to content

Commit 84e76f7

Browse files
committed
refactor(cli): remove stale cli provider leftovers
1 parent b664541 commit 84e76f7

32 files changed

Lines changed: 20 additions & 1189 deletions

docs/concepts/context.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ pluggable interface, lifecycle hooks, and configuration.
167167
`/context` prefers the latest **run-built** system prompt report when available:
168168

169169
- `System prompt (run)` = captured from the last embedded (tool-capable) run and persisted in the session store.
170-
- `System prompt (estimate)` = computed on the fly when no run report exists (or when running via a CLI backend that doesn’t generate the report).
170+
- `System prompt (estimate)` = computed on the fly when no run report exists yet.
171171

172172
Either way, it reports sizes and top contributors; it does **not** dump the full system prompt or tool schemas.
173173

docs/gateway/configuration-reference.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1064,7 +1064,6 @@ Z.AI GLM-4.x models automatically enable thinking mode unless you set `--thinkin
10641064
Z.AI models enable `tool_stream` by default for tool call streaming. Set `agents.defaults.models["zai/<model>"].params.tool_stream` to `false` to disable it.
10651065
Anthropic Claude 4.6 models default to `adaptive` thinking when no explicit thinking level is set.
10661066

1067-
- CLI backends are text-first; tools are always disabled.
10681067
- Sessions supported when `sessionArg` is set.
10691068
- Image pass-through supported when `imageArg` accepts file paths.
10701069

docs/plugins/architecture.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ native OpenClaw plugin registers against one or more capability types:
3030
| Capability | Registration method | Example plugins |
3131
| ---------------------- | ------------------------------------------------ | ------------------------------------ |
3232
| Text inference | `api.registerProvider(...)` | `openai`, `anthropic` |
33-
| CLI inference backend | `api.registerCliBackend(...)` | `openai`, `anthropic` |
3433
| Speech | `api.registerSpeechProvider(...)` | `elevenlabs`, `microsoft` |
3534
| Realtime transcription | `api.registerRealtimeTranscriptionProvider(...)` | `openai` |
3635
| Realtime voice | `api.registerRealtimeVoiceProvider(...)` | `openai` |

docs/plugins/sdk-overview.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ explicitly promotes one as public.
122122
| `plugin-sdk/provider-entry` | `defineSingleProviderPluginEntry` |
123123
| `plugin-sdk/provider-setup` | Curated local/self-hosted provider setup helpers |
124124
| `plugin-sdk/self-hosted-provider-setup` | Focused OpenAI-compatible self-hosted provider setup helpers |
125-
| `plugin-sdk/cli-backend` | CLI backend defaults + watchdog constants |
126125
| `plugin-sdk/provider-auth-runtime` | Runtime API-key resolution helpers for provider plugins |
127126
| `plugin-sdk/provider-auth-api-key` | API-key onboarding/profile-write helpers |
128127
| `plugin-sdk/provider-auth-result` | Standard OAuth auth-result builder |
@@ -283,7 +282,6 @@ methods:
283282
| Method | What it registers |
284283
| ------------------------------------------------ | -------------------------------- |
285284
| `api.registerProvider(...)` | Text inference (LLM) |
286-
| `api.registerCliBackend(...)` | Local CLI inference backend |
287285
| `api.registerChannel(...)` | Messaging channel |
288286
| `api.registerSpeechProvider(...)` | Text-to-speech / STT synthesis |
289287
| `api.registerRealtimeTranscriptionProvider(...)` | Streaming realtime transcription |

docs/reference/session-management-compaction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ Notes:
332332
- The default prompt/system prompt include a `NO_REPLY` hint to suppress
333333
delivery.
334334
- The flush runs once per compaction cycle (tracked in `sessions.json`).
335-
- The flush runs only for embedded Pi sessions (CLI backends skip it).
335+
- The flush runs only for embedded Pi sessions.
336336
- The flush is skipped when the session workspace is read-only (`workspaceAccess: "ro"` or `"none"`).
337337
- See [Memory](/concepts/memory) for the workspace file layout and write patterns.
338338

docs/tools/acp-agents.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ Important distinction:
114114
For operators, the practical rule is:
115115

116116
- want `/acp spawn`, bindable sessions, runtime controls, or persistent harness work: use ACP
117-
- want simple local text fallback through the raw CLI: use CLI backends
118117

119118
## Bound sessions
120119

scripts/audit-seams.mjs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,6 @@ function describeCronSeamKinds(relativePath, source) {
583583

584584
const seamKinds = [];
585585
const importsAgentRunner = hasAnyImportSource(source, [
586-
"../../agents/cli-runner.js",
587586
"../../agents/pi-embedded.js",
588587
"../../agents/model-fallback.js",
589588
"../../agents/subagent-registry.js",
@@ -625,9 +624,7 @@ function describeCronSeamKinds(relativePath, source) {
625624

626625
if (
627626
importsAgentRunner &&
628-
/\brunCliAgent\b|\brunEmbeddedPiAgent\b|\brunWithModelFallback\b|\bregisterAgentRunContext\b/.test(
629-
source,
630-
)
627+
/\brunEmbeddedPiAgent\b|\brunWithModelFallback\b|\bregisterAgentRunContext\b/.test(source)
631628
) {
632629
seamKinds.push("cron-agent-handoff");
633630
}

scripts/e2e/plugins-docker.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -908,8 +908,6 @@ if (!inspect.gatewayMethods.includes("demo.marketplace.shortcut.v2")) {
908908
console.log("ok");
909909
NODE
910910
911-
echo "Running bundle MCP CLI-agent e2e..."
912-
pnpm exec vitest run --config vitest.e2e.config.ts src/agents/cli-runner.bundle-mcp.e2e.test.ts
913911
EOF
914912

915913
echo "OK"

src/agents/command/session-store.test.ts

Lines changed: 0 additions & 72 deletions
This file was deleted.

src/agents/model-selection.test.ts

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import { describe, it, expect, vi } from "vitest";
2-
import type { OpenClawConfig } from "../config/config.js";
32
import { resetLogger, setLoggerOverride } from "../logging/logger.js";
43
import {
54
buildAllowedModelSet,
65
inferUniqueProviderFromConfiguredModels,
7-
isCliProvider,
86
parseModelRef,
97
buildModelAliasIndex,
108
normalizeModelSelection,
@@ -101,7 +99,7 @@ function createProviderWithModelsConfig(provider: string, models: Array<Record<s
10199

102100
function resolveConfiguredRefForTest(cfg: Partial<OpenClawConfig>) {
103101
return resolveConfiguredModelRef({
104-
cfg: cfg as OpenClawConfig,
102+
cfg: cfg,
105103
defaultProvider: "openai",
106104
defaultModel: "gpt-5.4",
107105
});
@@ -131,12 +129,6 @@ describe("model-selection", () => {
131129
});
132130
});
133131

134-
describe("isCliProvider", () => {
135-
it("returns false for provider ids", () => {
136-
expect(isCliProvider("example-cli", {} as OpenClawConfig)).toBe(false);
137-
});
138-
});
139-
140132
describe("modelKey", () => {
141133
it("keeps canonical OpenRouter native ids without duplicating the provider", () => {
142134
expect(modelKey("openrouter", "openrouter/hunter-alpha")).toBe("openrouter/hunter-alpha");
@@ -462,7 +454,7 @@ describe("model-selection", () => {
462454
};
463455

464456
const index = buildModelAliasIndex({
465-
cfg: cfg as OpenClawConfig,
457+
cfg: cfg,
466458
defaultProvider: "anthropic",
467459
});
468460

@@ -751,7 +743,7 @@ describe("model-selection", () => {
751743
};
752744

753745
const result = resolveConfiguredModelRef({
754-
cfg: cfg as OpenClawConfig,
746+
cfg: cfg,
755747
defaultProvider: "google",
756748
defaultModel: "gemini-pro",
757749
});
@@ -779,7 +771,7 @@ describe("model-selection", () => {
779771
};
780772

781773
const result = resolveConfiguredModelRef({
782-
cfg: cfg as OpenClawConfig,
774+
cfg: cfg,
783775
defaultProvider: "google",
784776
defaultModel: "gemini-pro",
785777
});
@@ -832,7 +824,7 @@ describe("model-selection", () => {
832824
it("should use default provider/model if config is empty", () => {
833825
const cfg: Partial<OpenClawConfig> = {};
834826
const result = resolveConfiguredModelRef({
835-
cfg: cfg as OpenClawConfig,
827+
cfg: cfg,
836828
defaultProvider: "openai",
837829
defaultModel: "gpt-4",
838830
});
@@ -912,7 +904,7 @@ describe("model-selection", () => {
912904
};
913905

914906
const result = resolveConfiguredModelRef({
915-
cfg: cfg as OpenClawConfig,
907+
cfg: cfg,
916908
defaultProvider: "openai",
917909
defaultModel: "gpt-5.4",
918910
});

0 commit comments

Comments
 (0)