Skip to content

Release v2.5.0

Latest

Choose a tag to compare

@Sahil5963 Sahil5963 released this 15 Apr 06:28
· 46 commits to beta since this release

Copilot SDK v2.5.0 🎊

The biggest release since v2.0 β€” Skills, Generative UI, Fallback Chains, Branching, Headless mode, and much more. πŸš€

Packages

Package Version
@yourgpt/copilot-sdk 2.5.0
@yourgpt/llm-sdk 2.5.0

✨ What's New

🧠 Skills System

Define instruction playbooks that guide your copilot's behavior β€” not just tools, but how the AI should think and respond. Load skills eagerly, on-demand, or let the AI discover them automatically.

  • defineSkill(), useSkill(), useSkillStatus() hooks
  • Loading strategies: eager, auto, manual
  • Sources: inline, URL, or file-based
  • AI-powered skill discovery via load_skill tool

🎨 Generative UI

Render rich, interactive UI components directly from AI tool responses β€” charts, tables, stats cards, and custom HTML.

  • Payload types: Chart, Table, Stat, Card, HTML
  • useGenerativeUI() hook
  • Shadow DOM sandbox with Tailwind CSS
  • Chart types: bar, line, pie, area, scatter

☁️ YourGPT Integration

Plug your YourGPT API key and unlock managed features out of the box.

  • Add your YourGPT project API key and connect your project knowledge base directly to the copilot
  • Sync conversations to your YourGPT account automatically
  • Support for files and attachments

πŸ”€ Fallback Chains & Routing

Production resilience β€” automatic failover across LLM providers. Never let a single provider outage take down your copilot.

  • createFallbackChain() β€” define ordered provider fallback with automatic failover
  • Routing strategies: priority (try in order) or round-robin (distribute load)
  • Exponential backoff with configurable retry delays
  • MemoryRoutingStore β€” tracks failed providers to skip them on subsequent requests
  • onFallback callback β€” monitor and log failover events in real-time
  • FallbackExhaustedError β€” graceful handling when all providers are down
  • 3 new providers: Together AI, Fireworks.ai, OpenRouter

🌿 Conversation Branching

Explore multiple response paths from any message. Edit a previous message and branch into a new conversation without losing history.

  • MessageTree for managing conversation branches
  • Branch navigation UI with variant controls
  • Full persistence support β€” save and restore all branches

πŸ“Ž Attachments

Drag-and-drop file uploads with validation, preview, and multimodal support.

  • Images, PDFs, CSV, and text files
  • File size validation (configurable)
  • AttachmentStrip and DropZoneOverlay components
  • Cloud upload integration

πŸ”§ Headless Mode & Chat Primitives

Build fully custom UIs with zero opinions on layout or styling.

  • useCopilotEvent() β€” subscribe to raw stream events
  • useMessageMeta() β€” per-message reactive metadata
  • ChatPrimitives β€” composable building blocks (MessageList, Header, Input)
  • messageView prop for complete message rendering control

πŸ› Bug Fixes

  • Fixed branch tree corruption during streaming
  • Fixed infinite re-render in useMessageMeta
  • Fixed tool-use/result ordering in localStorage persistence
  • Fixed message chain loss during mid-stream continuation
  • Stable schema references to prevent re-render loops

πŸ“š Resources

πŸ’œ Contributors

Thanks to all contributors who made this release possible! πŸ™Œ


Full Changelog: v2.1.0...v2.5.0