Releases: SAP/ai-sdk-js
Releases · SAP/ai-sdk-js
v2.7.0
Compatibility Notes
- [ai-api] Extract functionality around execution scheduling from the
ExecutionApitoExecutionScheduleApi. (8616d5e) - [ai-api] Remove the
BckndEventtype. (8616d5e) - [ai-api] Split the
BckndArgoCDApplicationDataintoBckndArgoCDApplicationDataResponseandBckndArgoCDApplicationDataRequest. (8616d5e) - [core] Remove deprecated and retired models from model list.
Remove retired modelanthropic--claude-3-sonnetfrom model list, use suggested replacementanthropic--claude-4.5-sonnetinstead.
Remove retired modelanthropic--claude-3-opusfrom model list.
Remove deprecated modelgpt-4o-mini, use suggested replacementgpt-5-miniinstead.
Remove deprecated modelsanthropic--claude-3.5-sonnetandanthropic--claude-3.7-sonnet. (b12626b) - [orchestration] Support for constructing an
OrchestrationStreamResponsewithout anHttpResponsehas been deprecated, and will be removed in the next major release.
Code directly instantiating this class should be updated to provide anHttpResponseobject as the first parameter to allow reading from raw HTTP response. (6b49479)
New Features
- [core] Advertise AbortSignal support for HTTP request cancellation.
This change adds typings, documentation and examples for using AbortSignal with the HTTP client to enable request cancellation. (b11b00c) - [langchain] Support the
withStructuredOutput()method in the Orchestration LangChain client. (4fce347) - [orchestration] Add
rawResponseproperty toOrchestrationStreamResponse.
The new property exposes the raw HTTP response from the orchestration service for advanced use cases. (6b49479) - [orchestration] Add
getRequestId()method toOrchestrationResponse,OrchestrationStreamResponseandOrchestrationEmbeddingResponse.
The new method allows retrieving the request ID from the orchestration service responses, which can be useful for debugging and tracking requests. (6b49479)
Improvements
v2.6.0
New Features
- [rpt] Release Beta version of a client for the SAP-RPT-1 model. (790ad05)
Fixed Issues
- [orchestration] Export
isConfigReference()method as a value instead of type-only export.
This function can now be imported and used at runtime to check if a configuration is an orchestration configuration reference type. (f3b6dc5)
v2.5.0
Compatibility Notes
- [langchain] The
@langchain/corepackage is now a peer dependency.
You now have to install the@langchain/corepackage as a direct dependency of your project. (5b88f6f)
New Features
- [langchain] Support disabling streaming completely via the langchain option
disableStreaming. (b91e0a7) - [langchain] Support auto-streaming via the langchain option
streaming. When enabled (e.g., transparently by LangGraph), responses are automatically streamed ininvoke()calls. (b91e0a7) - [orchestration] Add support for orchestration configuration references in the orchestration client. (2f19a40)
Fixed Issues
- [langchain] Pin
@langchain/coreto v1.1.8 to avoid a regression. (9ff7cec)
Improvements
- [langchain] Move the
@langchain/corepackage from dependencies to peer dependencies.
This reduces the chance of version incompatibilities between langchain-related packages. (5b88f6f)
v2.4.0
Compatibility Notes
- [prompt-registry] In the prompt-registry client schema, the
Templatetype was renamed toPromptTemplate. (a3cbc6e)
New Features
- [orchestration] Added support for
applyToandtranslateMessagesHistoryin order to enable selective input translation and automatic inference of target language for output translation parameters. (aa097da) - [prompt-registry] Update prompt-registry specification adding support for resource group scoped prompt templates. (a3cbc6e)
Improvements
- [core] Added
anthropic--claude-4.5-sonnet,anthropic--claude-4.5-haiku,gemini-2.5-flash-liteandsap-abap-1to the available model list.
Removed deprecated modelsgemini-2.0-flashandgemini-2.0-flash-litescheduled for retirement. (2e1d2c2)
v2.3.0
Compatibility Notes
- [langchain, orchestration, prompt-registry]
zodwas upgraded to v4 (7c9605d)
New Features
v2.2.0
Compatibility Notes
- [document-grounding]
MSSharePointConfigurationGetResponsenow requires thesharePointproperty (e2c34f3) - [document-grounding]
CommonConfigurationwas replaced with backend-specific types:SFTPConfigurationandS3Configuration(e2c34f3) - [document-grounding] Some types have been renamed to include endpoint-specific prefixes.
Some instances of the prior names may still exist:SearchResultswas renamed toVectorSearchResults/RetrievalSearchResultsChunkwas renamed toVectorChunk/RetrievalChunkSearchFilterwas renamed toVectorSearchFilterKeyValueListPairwas renamed toVectorKeyValueListPair/RetrievalKeyValueListPairDocumentKeyValueListPairwas renamed toVectorDocumentKeyValueListPair/RetrievalDocumentKeyValueListPairSearchConfigurationwas renamed toVectorSearchConfiguration/RetrievalSearchConfigurationSearchSelectOptionEnumwas renamed toVectorSearchSelectOptionEnum/RetrievalSearchSelectOptionEnumPerFilterSearchResultwas renamed toRetrievalPerFilterSearchResultPerFilterSearchErrorwas renamed toRetrievalPerFilterSearchErrorDataRepositorySearchResultwas renamed toRetrievalDataRepositorySearchResultSearchInputwas renamed toRetrievalSearchInput(e2c34f3)
- [langchain] Remove structured ouput handling for deprecated gpt-4 & gpt-3 models (6100bca)
New Features
- [ai-api] Update
ai-apipackage with the new specification (2509b). (58464e9) - [core, orchestration] Introduce orchestration embedding client for consuming embedding feature of the orchestration service. (347eac1)
- [document-grounding] Update document-grounding specification (e2c34f3)
Fixed Issues
- [core] Replace active logging during streaming with error throwing to avoid logging the response payload. (5225275)
Improvements
- [core, orchestration] Add
cohere--command-a-reasoning,mistralai--mistral-medium-instructand perplexity-aisonarandsonar-proto model list (6100bca)
v2.1.0
v2.0.0
Compatibility Notes
- [foundation-models, orchestration] Change stream method parameter from
AbortControllertoAbortSignal.
Thestream()method now accepts anAbortSignalinstead of anAbortControlleras the second parameter in both Azure OpenAI and Orchestration clients. (4c00c27) - [foundation-models, orchestration] Response object
dataproperty is renamed to_data.
Use getter methods likegetContent(),getTokenUsage(),getAssistantMessage()instead of direct data access. (5c52cb6) - [foundation-models] Move generated types to internal exports while keeping frequently used types in main exports.
- Generated types are no longer exported from
@sap-ai-sdk/foundation-modelsand must be imported from@sap-ai-sdk/foundation-models/internal.jsinstead. - Frequently used types (
AzureOpenAiChatCompletionTool,AzureOpenAiFunctionObject,AzureOpenAiChatCompletionRequestMessage,AzureOpenAiChatCompletionRequestSystemMessage,AzureOpenAiChatCompletionRequestUserMessage,AzureOpenAiChatCompletionRequestAssistantMessage,AzureOpenAiChatCompletionRequestToolMessage) remain available from main package exports. - Add new type
AzureOpenAiChatCompletionParametersto replaceAzureOpenAiCreateChatCompletionRequestwhich is no longer exported publicly. (5c52cb6)
- Generated types are no longer exported from
- [langchain] Major breaking changes for LangChain orchestration v2:
- Update LangChain orchestration configuration structure to use
promptTemplatinginstead of separatellmandtemplatingproperties. - Replace
llm.model_namewithpromptTemplating.model.nameandllm.model_paramswithpromptTemplating.model.params. - The
templating.templateproperty is nowpromptTemplating.prompt.template. - Rename
inputParamsparameter toplaceholderValuesin LangChain orchestration client methods. - Update message response property names from
module_resultstointermediate_resultsin additional kwargs. (86e6370)
- Update LangChain orchestration configuration structure to use
- [langchain] Update imports to use new API facade from foundation-models package.
- Some generated types now need to be imported from
@sap-ai-sdk/foundation-models/internal.jsinstead of@sap-ai-sdk/foundation-models. - Update to use new
AzureOpenAiChatCompletionParameterstype to replaceAzureOpenAiCreateChatCompletionRequestwhich is no longer exported publicly. (5c52cb6)
- Some generated types now need to be imported from
- [orchestration]
buildTranslationConfig()function now requirestypeparameter to distinguish betweeninputandoutputtranslation configuration. (740ba78) - [orchestration]
buildLlamaGuardFilter()function has been renamed tobuildLlamaGuard38BFilter(). It now requires a type parameter to distinguish betweeninputandoutputfilter configurations, and accepts filter categories as an array. (740ba78) - [orchestration] Move generated types to internal exports while keeping frequently used types in main exports.
- Generated types are no longer exported from
@sap-ai-sdk/orchestrationand must be imported from@sap-ai-sdk/orchestration/internal.jsinstead. - Frequently used types (
ChatMessage,SystemChatMessage,UserChatMessage,AssistantChatMessage,ToolChatMessage,DeveloperChatMessage,ChatCompletionTool,FunctionObject) remain available from main package exports. (5c52cb6)
- Generated types are no longer exported from
- [orchestration]
buildAzureContentSafetyFilter()function now requirestypeparameter to distinguish betweeninputandoutputfilter configuration. (997e8ec) - [orchestration] Major breaking changes for orchestration v2:
- Consolidate
llmandtemplatingmodules into a singlepromptTemplatingmodule. - The
llm.model_nameproperty is nowpromptTemplating.model.nameandllm.model_paramsis nowpromptTemplating.model.params. - The
templating.templateproperty is nowpromptTemplating.prompt.template. - Rename
inputParamsparameter toplaceholderValuesin orchestration client methods. - Update response property names from
orchestration_resulttofinal_resultandmodule_resultstointermediate_results. - Replace top-level
streamproperty withstreamOptions.enabledand update streaming module options fromllmtopromptTemplating. - Update grounding configuration to use
placeholders.inputandplaceholders.outputinstead of separateinput_paramsandoutput_param. - Update Azure content filter property names to lowercase with underscores:
Hatetohate,SelfHarmtoself_harm,Sexualtosexual, andViolencetoviolence. - Remove deprecated
buildAzureContentFilter()function and usebuildAzureContentSafetyFilter()instead. (86e6370)
- Consolidate
New Features
- [ai-api] Add
resolveDeploymentUrl()function to resolve the deployment URL that matches the given criteria. (14745de) - [foundation-models] Add
getTokenUsage(),getFinishReason(),getContent(),getToolCalls(),getRefusal(),getAssistantMessage(),findChoiceByIndex()methods to Azure OpenAI chat completion response. (5c52cb6) - [orchestration] Add
prompt_shieldproperty tobuildAzureContentSafetyFilter()function for input filter configuration to allow enabling prompt attack detection. (997e8ec) - [orchestration] Add
getIntermediateResults()method toOrchestrationResponse,OrchestrationStreamResponse,OrchestrationStreamChunkResponseclasses for accessing intermediate processing results from orchestration modules. (5c52cb6) - [orchestration] Add
deploymentIdas the optional parameter for OrchestrationClient initialization. (0a418d0) - [orchestration] Add
findChoiceByIndex()method to find specific choices by index in streaming responses. (5c52cb6)
Improvements
- [core] Add
gpt-5,gpt-5-miniandgpt-5-nanoto and removegemini-1.5-flash,gemini-1.5-proandibm--granite-13b-chatfrom the available model list. (500c0dd) - [core] Add
anthropic--claude-4-opus,anthropic--claude-4-sonnet,amazon--nova-premier,gemini-2.5-flashandgemini-2.5-proto and removemistralai--mixtral-8x7b-instruct-v01,meta--llama3.1-70b-instruct,nvidia--llama-3.2-nv-embedqa-1b,amazon--titan-embed-text,gpt-4,amazon--titan-text-expressandamazon--titan-text-litefrom the available model list. (9e1c43a)
v1.18.0
Improvements
- [core] Add
gpt-5,gpt-5-miniandgpt-5-nanoto and removegemini-1.5-flash,gemini-1.5-proandibm--granite-13b-chatfrom the available model list. (97711bc) - [core] Add
anthropic--claude-4-opus,anthropic--claude-4-sonnet,amazon--nova-premier,gemini-2.5-flashandgemini-2.5-proto and removemistralai--mixtral-8x7b-instruct-v01,meta--llama3.1-70b-instruct,nvidia--llama-3.2-nv-embedqa-1b,amazon--titan-embed-text,gpt-4,amazon--titan-text-expressandamazon--titan-text-litefrom the available model list. (b2629b4)
v1.17.0
New Features
- [langchain] Support
withStructuredOutput()method in OpenAI LangChain client. (8bb24c3)
Fixed Issues
- [langchain] Use
isInteropZodSchemainstead ofisZodSchemaV4in LangChain Azure OpenAI and Orchestration clients to support both Zod v3 and v4 schemas. (8d54af6)
Improvements
- [orchestration] Add support for standard and custom DPI entities in
buildDpiMaskingProvider()function.
Allow configuration of masking strategies viareplacement_strategyfor both entity types. (fab35bc) - [orchestration] Add utility functions
getContent(),getRefusal(),getAllMessages(),getAssistantMessage(), andgetResponse()to stream response. (225f40c)