mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-28 05:16:23 -06:00
perf: stop provider policy loads from compiling the transport graph (#129652)
* perf(plugins): keep provider policy artifacts on leaf module graphs Provider policy artifacts (provider-policy-api.js) load eagerly whenever a provider is resolved, but five of them imported the provider-model-shared barrel at runtime, dragging the transports/compat/state graph into every policy load. In contexts without a native TS require hook (Vitest workers, non-tsx source runs) jiti compiled that whole graph: ~65s of event-loop starvation on the first embedded run, which is what pushed run.session-permissions.test.ts past its 120s timeout before #129582. Add openclaw/plugin-sdk/claude-model-runtime, a narrow family-level and local-only subpath re-exporting the Claude identity/thinking helpers from their leaf owners (@openclaw/llm-core, plugins/provider-claude-thinking). Switch anthropic, anthropic-vertex, and opencode policy artifacts to it, and amazon-bedrock plus ollama to the already-plugin-visible @openclaw/model-catalog-core leaves. The barrel keeps re-exporting the same symbols, so no existing consumer changes. Measured on the embedded-runner host route (first run, Vitest worker): 65540ms -> 6627ms; jiti self-time 23.4s -> 1.3s, statSync 18.6s -> 0.7s. run.shared-integration.test.ts drops from 167s to 65s as a side effect. Also pin run.inherited-auth-owner.test.ts to the mocked plugin-harness route (its assertions are provider-agnostic; 37.6s -> sub-second test time) and document the no-provider default-route trap on overflowBaseRunParams. Follow-up to #129582. * chore(plugins): register claude-model-runtime boundary aliases The extension package boundary contract requires every local-only plugin-sdk entrypoint to carry a d.ts path alias in the shared boundary map and xai's derived override set; CI's contracts-plugin lane caught the missing entries. * chore(release): exclude claude-model-runtime declarations from the pack Local-only plugin-sdk entrypoints ship runtime .js only; the release check derives the required pack exclusion from the local-only registry and CI's core-tooling lane caught the missing package.json files entry. * test(agents): assert the mocked harness route in auth-owner proof ClawSweeper P2: without the agentHarnessId assertion a silent fall-back to the built-in host harness would still pass the auth-owner assertions while proving the wrong route; fail loudly like run.session-permissions.test.ts.
This commit is contained in:
committed by
GitHub
parent
3a759c85c5
commit
708632c451
@@ -1,9 +1,9 @@
|
||||
import { resolveClaudeThinkingProfile } from "openclaw/plugin-sdk/claude-model-runtime";
|
||||
// Opencode API module exposes the plugin public contract.
|
||||
import type {
|
||||
ProviderDefaultThinkingPolicyContext,
|
||||
ProviderThinkingProfile,
|
||||
} from "openclaw/plugin-sdk/plugin-entry";
|
||||
import { resolveClaudeThinkingProfile } from "openclaw/plugin-sdk/provider-model-shared";
|
||||
|
||||
const FIXED_REASONING_PROFILE = {
|
||||
levels: [{ id: "off", label: "always on" }],
|
||||
|
||||
Reference in New Issue
Block a user