Skip to content

v1.54.0

Choose a tag to compare

@github-actions github-actions released this 12 Mar 22:35
· 0 commits to a62a97a195f859a1dfbfcce16af9c6ffd3a03852 since this release

CopilotKit v1.54.0

A minor release on the 1.54 line. Opens tool schemas to the broader Standard Schema ecosystem (Zod, Valibot, ArkType, …), ships a programmatic runTool() API, and starts the formal deprecation of the @copilotkitnext/* scope ahead of the 1.55 consolidation. Plus a few long-standing React Strict Mode and focus fixes.

Install

npm install @copilotkit/react-core@1.54.0 @copilotkit/react-ui@1.54.0 @copilotkit/runtime@1.54.0

Features

  • Standard Schema support for tool args@copilotkit/react-core now accepts any Standard Schema-compatible library for tool argument schemas. Previously Zod-only. (#3275)

    import { useFrontendTool } from "@copilotkit/react-core";
    import * as v from "valibot";
    
    useFrontendTool({
      name: "lookupOrder",
      args: v.object({ orderId: v.string() }),
      handler: async ({ orderId }) => fetchOrder(orderId),
    });
  • copilotkit.runTool() for programmatic tool execution — a new API on @copilotkit/core and @copilotkit/react-core for invoking registered tools directly from app code, outside of an agent turn. Useful for wiring UI actions, tests, and side effects against the same tool definitions the LLM uses. (#3286)

    import { copilotkit } from "@copilotkit/core";
    
    const result = await copilotkit.runTool({
      name: "lookupOrder",
      args: { orderId: "ord_123" },
    });

Deprecations

  • @copilotkitnext/* packages deprecated — every package in the @copilotkitnext/* scope is being folded into its flat @copilotkit/* equivalent. The actual consolidation ships in 1.55; this release marks the deprecation. If you're on @copilotkitnext/react, @copilotkitnext/core, or @copilotkitnext/angular, plan the migration to @copilotkit/* now. The @copilotkit/react-core/v2 subpath remains the recommended path for v2 APIs during the transition. (3780c6ae)

React fixes (@copilotkit/react-core)

  • Strict Mode hook registrations stable — render registrations from useRenderTool, useComponent, etc. were being lost under React Strict Mode's double-invocation semantics. Fixed. (#3416)
  • Yield to React scheduler before follow-up agent runs — a follow-up agent run could kick off before React had committed the previous update; the runner now yields first. (#3421)
  • useCopilotReadable context flows into connectAgent — readable context was not being passed through to connectAgent. Now propagated. (#3422)

React-textarea fixes (@copilotkit/react-textarea)

  • Focus restored on Escape in CMD+K popup — pressing Escape was leaving focus on the popup; now it returns to the textarea. (#3257)

Packages republished at 1.54.0

v1 (@copilotkit/*): runtime, react-core, react-ui, react-textarea, runtime-client-gql, sdk-js, shared, a2ui-renderer.

v2 (@copilotkitnext/*, deprecated): agent, angular, core, react, runtime, shared, sqlite-runner, voice, web-inspector.