Repository navigation
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_skilltool
π¨ 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) orround-robin(distribute load) - Exponential backoff with configurable retry delays
MemoryRoutingStoreβ tracks failed providers to skip them on subsequent requestsonFallbackcallback β monitor and log failover events in real-timeFallbackExhaustedErrorβ 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.
MessageTreefor 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)
AttachmentStripandDropZoneOverlaycomponents- Cloud upload integration
π§ Headless Mode & Chat Primitives
Build fully custom UIs with zero opinions on layout or styling.
useCopilotEvent()β subscribe to raw stream eventsuseMessageMeta()β per-message reactive metadataChatPrimitivesβ composable building blocks (MessageList, Header, Input)messageViewprop 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