All notable changes to the Graphlit TypeScript Client will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
-
Real-time streaming support with the new
streamAgentmethod- Native streaming integration with OpenAI, Anthropic, and Google Gemini models
- Automatic fallback to regular API calls when streaming providers are not available
- UI-optimized event stream with automatic message accumulation
- Support for tool calling during streaming conversations
- Configurable chunking strategies (character, word, sentence)
- Smooth streaming with configurable delays to prevent UI flicker
-
Custom LLM client support
setOpenAIClient()method to use custom OpenAI instancessetAnthropicClient()method to use custom Anthropic instancessetGoogleClient()method to use custom Google Generative AI instances- Support for proxy configurations and custom endpoints
-
Enhanced streaming features
- AbortController support for cancelling ongoing streams
- Conversation continuity - continue streaming in existing conversations
- Comprehensive error handling with recoverable error detection
- Tool execution with streaming responses
- Real-time token-by-token updates
-
New TypeScript types
UIStreamEvent- High-level streaming events for UI integrationStreamEvent- Low-level streaming events for fine controlStreamAgentOptions- Configuration options for streamingToolHandler- Type-safe tool handler functionsAgentResult,ToolCallResult,UsageInfo- Supporting types
- LLM client libraries (openai, @anthropic-ai/sdk, @google/generative-ai) are now optional peer dependencies
- Improved TypeScript typing throughout the codebase
- Enhanced error messages for better debugging
- Message formatting issues with trailing whitespace
- Tool calling message role assignment
- Conversation history handling in streaming mode
- Pre-aborted signal handling
- Google Gemini streaming text completeness
- Queue-based chunk emission for consistent streaming behavior
- Unicode-aware text segmentation using Intl.Segmenter
- Proper cleanup of resources in test suites
- Comprehensive test coverage for streaming functionality
- GraphQL client for Graphlit API
- Support for all Graphlit operations (content, conversations, specifications, etc.)
- JWT-based authentication
- Environment variable configuration
- TypeScript support with generated types