- The SDK now includes a new
AnalyticsOperationColumnCostBreakdownLlmCachedPromptTokensanalytics column constant for tracking LLM cached prompt token costs. TheAnalyticsQueryDtotype now always serializes theQueriesfield (previously omitted when empty), and all analytics types have been hardened with nil-receiver safety to prevent panics when callingGetExtraProperties()orString()on nil pointers. - Several assistant union types have been restructured with breaking API changes.
Renamed struct fields and Visitor methods — The union types
AssistantCredentialsItem,AssistantModel,AssistantTranscriber,AssistantVoice, and theirUpdateAssistantDtocounterparts have had all exported fields andVisitorinterface methods renamed from verbose DTO names (e.g.CreateElevenLabsCredentialDto,VisitCreateElevenLabsCredentialDto) to short provider-keyed names (e.g.Field11Labs,VisitField11Labs). Callers must update all field accesses, struct literals, andVisitorinterface implementations. New capabilities — New credential providers (AnthropicBedrock,Soniox,Wellsaid,Email,SlackWebhook), model providers (AnthropicBedrock,Minimax), transcriber provider (Soniox), and voice provider (Wellsaid) are now available. A newSessionCreatedHookvariant has been added to the assistant hooks union, and new client/server message constantsAssistantClientMessagesItemAssistantSpeechStartedandAssistantServerMessagesItemAssistantSpeechStartedare now exported. - The
Campaign,CreateCampaignDto, andUpdateCampaignDtotypes now support two new fields:SquadId(to specify a squad for campaign calls alongside the existingassistantId/workflowIdoptions) andDialPlan(a list ofDialPlanEntryvalues pairing phone numbers with customers, as an alternative to the top-levelPhoneNumberId). As part of this change,PhoneNumberIdonCreateCampaignDtoandCampaignhas changed from a requiredstringto an optional*string— callers that previously set this field directly must now pass a pointer. TheCallControllerFindAllPaginatedmethod has been removed fromcalls.Clientandcalls.RawClient; useListinstead. - The
ChatCostsItemunion type has been redesigned with a discriminant-based approach. The fields previously namedModelCostandChatCostare now namedModelandChat, and the visitor interface methods have been renamed fromVisitModelCost/VisitChatCosttoVisitModel/VisitChat. TheChatCost.Typefield, theChatCostTypeenum, and all related helpers (GetType,SetType,NewChatCostTypeFromString,Ptr) have been removed fromChatCost. Callers using these symbols or the oldChatCostsItemVisitorinterface must update their implementations. - New additions in this release:
ListChatsRequestgainsIdandAssistantIdAnyfilter fields;TwilioSmsChatTransportgains aCustomerIdfield; and a newMaxBufSizeOptionrequest option is available. - The
File.Metadatafield and its associatedGetMetadata()andSetMetadata()methods now usemap[string]any(an alias formap[string]interface{}), which is fully compatible with existing code. TheFiletype also gains nil-receiver safety inGetExtraProperties()andString(), andUpdateFileDtonow supports proper JSON marshaling with explicit-field handling. - Phone number union types (
CreatePhoneNumbersRequest,CreatePhoneNumbersResponse,DeletePhoneNumbersResponse,GetPhoneNumbersResponse,ListPhoneNumbersResponseItem,UpdatePhoneNumbersResponse,PhoneNumberPaginatedResponseResultsItem, and allFallbackDestination/HooksItemvariants) have been redesigned with discriminant-based dispatch. Breaking changes: Exported struct fields and accessor/visitor methods have been renamed throughout. For example,GetTwilioPhoneNumber()is nowGetTwilio(),GetTransferDestinationNumber()is nowGetNumber(),VisitPhoneNumberHookCallRinging()is nowVisitCallRinging(), and the unexportedProvider()getter has been removed from model types (ByoPhoneNumber,TwilioPhoneNumber, etc.). Callers that implementVisitorinterfaces or access union fields by the old names must be updated to use the new names. - Each union struct now exposes an exported
Provider,Type, orOndiscriminant field, andUnmarshalJSONreads that field first for reliable routing instead of trying each variant in sequence. - The
ProviderResource.Resourcefield type has changed from*ElevenLabsPronunciationDictionarytomap[string]any, and theElevenLabsPronunciationDictionarystruct along with itsElevenLabsPronunciationDictionaryPermissionOnResourcetype have been removed. Callers that reference these types or use the typedGetResource()/SetResource()methods must update their code to work withmap[string]any. Additionally, Cartesia ("cartesia") is now a supported provider value across all provider resource request and response types. - The
SessionCostsItemunion type has been redesigned with breaking changes. The fieldsModelCost,AnalysisCost, andSessionCosthave been renamed toModel,Analysis, andSession, and a new exportedTypediscriminant field has been added. The visitor interface methodsVisitModelCost,VisitAnalysisCost, andVisitSessionCosthave been renamed toVisitModel,VisitAnalysis, andVisitSession— all implementations ofSessionCostsItemVisitormust be updated. TheSessionCostTypetype, its constants (SessionCostTypeSession),NewSessionCostTypeFromString, and theSessionCost.Type/GetType/SetTypemembers have been removed. - New fields are available on sessions:
AssistantOverrides(with getter/setter) on bothCreateSessionDtoandSession, andCustomerId(with getter/setter) on both. New filter parametersId,AssistantIdAny,CustomerNumberAny,PhoneNumberId, andPhoneNumberIdAnyhave been added toListSessionsRequest. - Several breaking changes have been made to the structured outputs API types in this release.
Removed types:
CreateStructuredOutputDto,CreateStructuredOutputDtoModel,ComplianceOverride, andGenerateStructuredOutputSuggestionsDtohave been removed from the SDK. Callers using these types must migrate to the updated API. Renamed union accessors and visitor methods:StructuredOutputModelandUpdateStructuredOutputDtoModelnow use provider-discriminant-based field names and visitor methods. Replace calls toGetWorkflowOpenAiModel()→GetOpenai(),GetWorkflowAnthropicModel()→GetAnthropic(),GetWorkflowGoogleModel()→GetGoogle(),GetWorkflowCustomModel()→GetCustomLlm(); update visitor interfaces accordingly (VisitOpenai,VisitAnthropic,VisitAnthropicBedrock,VisitGoogle,VisitCustomLlm). A newAnthropicBedrockprovider variant (WorkflowAnthropicBedrockModel) is also available. New regex extraction mode:StructuredOutputandUpdateStructuredOutputDtonow exposeType(StructuredOutputType/UpdateStructuredOutputDtoType) andRegexfields, enabling pattern-based extraction from transcripts without an LLM. - The
StructuredOutputControllerSuggestmethod has been removed from the structured outputs client. If your code called this method, those calls must be removed as there is no direct replacement in this release. All structured output types continue to be available under the root SDK package. - The SDK now supports form URL-encoded request bodies for endpoints that require
Content-Type: application/x-www-form-urlencoded. DateTime deserialization is significantly more flexible, accepting Unix epoch integers, RFC3339Nano with fractional seconds, ISO 8601 without timezone, and date-only strings in addition to plain RFC3339. Time values serialized as query parameters now use millisecond precision (e.g.2006-01-02T15:04:05.000Z07:00) to match common API expectations. Retried HTTP requests now correctly re-send the original request body instead of an empty one. - The SDK now supports configuring the maximum buffer size for streaming responses via the new
WithMaxStreamBufSize(size int)request option. A newBytes()pointer helper function has been added for[]bytevalues.UpdateScorecardDtonow includes proper JSON marshaling/unmarshaling support, and nil-safety guards have been added to several scorecard methods.