Skip to content

A repository demonstrating efforts to integrate CopilotKit v1.50 beta 2 into the quickstart application. This repo serves as a reproducible example to showcase and document the errors and issues encountered during the integration process.

Notifications You must be signed in to change notification settings

mubinansari/copilotkit-1.50-integration

Repository files navigation

CopilotKit v1.50 Integration Reproduction

This repository documents the process and challenges encountered while attempting to integrate CopilotKit v1.50 (Beta 2) into a standard Next.js application. It serves as a reproducible example for the issues observed during the upgrade.

Branch Overview

The repository is organized into branches representing different stages and approaches to the integration:

  • main

    • Base Next.js application, bootstrapped via the official CLI.
  • 01-copilot-stable

    • Successful implementation of CopilotKit stable version with LangChain, following the official quickstart guide.
  • 02-copilot-1.50

    • Attempted upgrade to CopilotKit v1.50 beta.
    • Outcome: Runtime failure with the error: { url: 'http://localhost:3000/api/copilotkit' } Invalid single-route payload.
  • 03-copilot-1.50-with-langchain-1.x

    • Investigation into potential version conflicts by upgrading LangChain from v0.3.x (CopilotKit peer dependency) to v1.x.x.
    • Outcome: Failed due to extensive type errors; approach abandoned.
  • 04-copilot-1.50-with-openai-adapter

    • Isolated test using the bare-bones OpenAIAdapter to rule out LangChain adapter specifics.
    • Outcome:
      • Partial Success: Basic chat functionality and frontend tools (via useCopilotAction) work.
      • Issues:
        • The copilotkitSuggest payload (used for suggestion generation) triggers a console error: { url: 'http://localhost:3000/api/copilotkit' } Invalid single-route payload and returns a 400 Bad Request with Missing method field.
        • Critical Failure: Adding useCopilotReadable causes the chat to stop working entirely, returning no response.

Summary of Findings

According to the CopilotKit v1.50 Pre-Release Packet, the new version is intended to be fully backward compatible. However, our testing indicates a consistent regression affecting payload handling.

Specifically:

  1. The OpenAIAdapter seems to expect a method field in the request body which is missing in the copilotkitSuggest payload generated by the frontend SDK.
  2. useCopilotReadable breaks the chat loop completely.

Due to limited documentation for the beta release and a lack of similar reported issues, debugging has proven difficult. This repository aims to facilitate collaboration and resolution of these errors.

About

A repository demonstrating efforts to integrate CopilotKit v1.50 beta 2 into the quickstart application. This repo serves as a reproducible example to showcase and document the errors and issues encountered during the integration process.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published