-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
refactor: extract reusable AI runtime packages #99040
Copy link
Copy link
Closed
Labels
P3Low-priority cleanup, docs, polish, ergonomics, or speculative work.Low-priority cleanup, docs, polish, ergonomics, or speculative work.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.enhancementNew feature or requestNew feature or requestimpact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🌊 off-meta tidepoolIssue quality rating does not apply to this item.Issue quality rating does not apply to this item.maintainerMaintainer-authored PRMaintainer-authored PR
Description
Metadata
Metadata
Assignees
Labels
P3Low-priority cleanup, docs, polish, ergonomics, or speculative work.Low-priority cleanup, docs, polish, ergonomics, or speculative work.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.enhancementNew feature or requestNew feature or requestimpact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🌊 off-meta tidepoolIssue quality rating does not apply to this item.Issue quality rating does not apply to this item.maintainerMaintainer-authored PRMaintainer-authored PR
Type
Fields
Priority
None yet
Summary
Extract OpenClaw's normalized model execution contracts and API-family transports into publishable, reusable npm packages while keeping existing OpenClaw provider, config, auth, plugin, and transcript behavior unchanged.
Problem to solve
The reusable message, tool, stream, usage, and validation contracts already exist under the private
@openclaw/llm-coreand@openclaw/llm-runtimeworkspace packages, but provider transports still live undersrc/llmand depend back on OpenClaw host policy. Consumers cannot reuse OpenClaw's model execution layer without depending on the full application, and the current global registry/import-side-effect shape is unsafe as a public library.Proposed solution
Alternatives considered
Impact
Evidence/examples
packages/llm-corealready owns normalized types, validation, diagnostics, and event streams.packages/llm-runtimealready owns provider registration and dispatch, but through a global registry.extensions/minimaxmaps its text models toanthropic-messages, demonstrating that vendor identity and wire protocol are separate axes.src/plugins/types.tscombines product/control-plane hooks that should remain OpenClaw-owned.Additional information
Compatibility gates must cover existing configs, provider/model ids, auth profiles, tool-call and reasoning replay, stream events, usage, cancellation, timeout/retry behavior, startup laziness, Node 22/24, Bun, and published OpenClaw install/update paths.