February 10, 2026
Breaking changes
Server-driven auth configuration for createSunnyChat
The createSunnyChat API now uses server-driven authentication configuration. Instead of passing Auth0 details (domain, clientId, connection) directly, you provide three required parameters and the server supplies all auth configuration automatically via the HTTP GET /sdk/config endpoint.
Before (v0.0.11):
After (v0.0.14):
Migration:
- Replace
auth.typewith top-levelauthType - Add
partnerIdentifierandpublicKey(provided by Sunny Health) - Remove all Auth0 configuration fields (
domain,clientId,connection,audience,organization) — these are now provided by the server - For
tokenExchange, moveidTokenProviderto a top-level option - The
authobject is no longer accepted
Removed types
The following types have been removed:
AuthConfigSamlOidcAuthConfigTokenExchangeAuthConfig
Replaced by:
UnifiedSunnyChatOptions— configuration forcreateSunnyChatSdkAuthType—'passwordless' | 'saml' | 'oidc' | 'tokenExchange'SdkAuthConfig— server-provided auth configuration (read-only)
New features
Runtime auth type switching
createSunnyChat now returns a VanillaChatInstance with a setAuthType method for switching authentication types at runtime:
Token exchange organization field
The tokenExchange configuration now includes a required organization field for Auth0 organization support.
Enhancements
- Default WebSocket URL is
wss://chat.api.sunnyhealthai-staging.com(no need to specify explicitly) SunnyAgentsClientcan be instantiated with no arguments for quick setupsendMessagenow returns{ conversationId: string }for trackingcreateConversationnow accepts an optionalconversationIdparameter