PackagePackagetypeA library you install and call yourself.See every one →What this type is →by SAPby SAPoriginPublished by SAP itself. A visible facet, never an input to a reading — a dormant official plugin reads exactly like a dormant independent one.See every one →

@sap-ai-sdk/foundation-models

The package of SAP's AI SDK that calls foundation models through SAP AI Core and the Generative AI Hub, and the one an application actually reaches for.

Facts

Latestv2.17.0ReleasedLast pushLicenceApache-2.0

Where it sits

Lives in
Provides
LLM integrationCAPLLM integrationcapabilityCalling a language model from application code with the tenant, destination and credential handling already solved instead using an SDK call with a hand-rolled key.
Designs
Generative AI on SAP BTPGenerative AI on SAP BTPreference architectureSDK within the application logic for the Generative AI Hub and the Vector Engine

Who is behind it

SAPSAPOrganisationMaintains this
In the atlas: maintains 137, wrote 14
@SAP
maintainerAnjanPersonContributes to this
In the atlas: contributes to 7
@anjan-poonacha
SAP Cloud SDK BotPersonContributes to this
In the atlas: contributes to 11
@bot-sdk-js
BrigittaK307PersonContributes to this
In the atlas: contributes to 12
@BrigittaK307
Charles DuboisPersonContributes to this
In the atlas: contributes to 5
@CharlesDuboisSAP
Christoph MatthiesPersonContributes to this
In the atlas: contributes to 5
@ChristophMatthies
David KnaackPersonContributes to this
In the atlas: contributes to 13, wrote 1
@davidkna-sap
Deeksha SinhaPersonContributes to this
In the atlas: contributes to 12
@deekshas8
Guilherme DellagustinPersonContributes to this
In the atlas: contributes to 27
@dellagustin-sap
emincihangeriPersonContributes to this
In the atlas: contributes to 12
@emincihangeri
Tian TengPersonContributes to this
In the atlas: contributes to 5
@Herrtian
21 contributors

Before choosing this

Conditions

LicenceSAP Developer License Agreement 3.2 CAP§ 3from LLM integrationCovered SAP materials or a covered CAP customer application are used as training data or to develop or refine an AI model or system.
  • § 3 Artificial Intelligence Training. The agreement prohibits use of the covered materials and customer applications for training artificial-intelligence models or systems.

Calling a model for inference is not automatically AI training. Section 3 matters when the covered material or application participates in training, model development, refinement or the text-and-data-mining uses it names.

SAP Developer License Agreement 3.2 CAP →

What it declares

Every artifact

Type
Package
Origin
By SAP

As a package

Where it runs
does not say
Distributed through
npm

For LLM integration

Supports
Streams the response
Models it reaches
SAP AI Core
property statedstated nonot said

Tasks this contributes to1Beta

Stream a model's answer out of a CAP serviceA CAP service receives a model's answer in pieces as the model writes it, rather than one payload after the model has finished, so a chat surface can show text appearing instead of a spinner.Coversstreaming client
What it does

The same mechanism one layer down, without the orchestration modules around it: the documentation states that the AzureOpenAiChatClient supports streaming response for chat completion requests based on the server-sent events standard, with the client constructed on a deployment.

Remaining work

Carry the chunks onward, as above, and accept that the templating, masking and filtering the orchestration client applies around a call are not here, so anything of that kind is the application's own code.

All options on the LLM integration page →

Connections1

Install

npm add @sap-ai-sdk/foundation-models

Derived from the package name. No recipe recorded; the README has the configuration.

README

quoted from SAP/ai-sdk-js under Apache-2.0, read
SAP/ai-sdk-js/packages/foundation-models/README.mdOn GitHub

@sap-ai-sdk/foundation-models

SAP Cloud SDK for AI is the official Software Development Kit (SDK) for SAP AI Core, SAP Generative AI Hub, and Orchestration Service.

This package incorporates generative AI foundation models into your AI activities in SAP AI Core and SAP AI Launchpad.

Table of Contents

Installation

npm install @sap-ai-sdk/foundation-models

Documentation

Visit the SAP Cloud SDK for AI (JavaScript) documentation portal to learn more about its capabilities and detailed usage.

Support, Feedback, Contribution

This project is open to feature requests, bug reports and questions via GitHub issues.

Contribution and feedback are encouraged and always welcome. For more information about how to contribute, the project structure, as well as additional contribution information, see our Contribution Guidelines.

License

The SAP Cloud SDK for AI is released under the Apache License Version 2.0.

Apache-2.0, read

History

Latest

v2.17.0

  1. v2.16.0

    Fixes 4

    Notes
    Patch Changes
    • Updated dependencies [0da56e2]
    • Updated dependencies [3483acb]
    • Updated dependencies [94b36e5]
    • Updated dependencies [4b2c014]
      • @sap-ai-sdk/core@2.16.0
      • @sap-ai-sdk/ai-api@2.16.0
  2. v2.15.0

    Fixes 1

    Notes
    Patch Changes
    • Updated dependencies [a5407c8]
      • @sap-ai-sdk/core@2.15.0
      • @sap-ai-sdk/ai-api@2.15.0
  3. v2.14.0

    Fixes 2

    Notes
    Patch Changes
    • Updated dependencies [cca7edd]
    • Updated dependencies [cca7edd]
      • @sap-ai-sdk/core@2.14.0
      • @sap-ai-sdk/ai-api@2.14.0
  4. v2.13.0

    Fixes 4

    Notes
    Patch Changes
    • Updated dependencies [11baf52]
    • Updated dependencies [cb8ffe7]
    • Updated dependencies [a8c9b29]
    • Updated dependencies [6542a2a]
      • @sap-ai-sdk/core@2.13.0
      • @sap-ai-sdk/ai-api@2.13.0
  5. v2.12.0

    Features 1, Fixes 3

    Notes
    Minor Changes
    • 0b41bea: [feat] Add createBatchInput() and parseBatchOutput() helpers for building and parsing LLM batch requests and responses.
    Patch Changes
    • Updated dependencies [0f10482]
    • Updated dependencies [e944aa1]
    • Updated dependencies [2faf4a8]
      • @sap-ai-sdk/core@2.12.0
      • @sap-ai-sdk/ai-api@2.12.0
  6. v2.11.0

    Fixes 2

    Notes
    Patch Changes
    • Updated dependencies [c8c0e41]
    • Updated dependencies [75bb9a9]
      • @sap-ai-sdk/core@2.11.0
      • @sap-ai-sdk/ai-api@2.11.0
  7. v2.10.0

    Features 3, Fixes 1

    Notes
    Minor Changes
    • a722171: [compat] Support for constructing an AzureOpenAiChatCompletionStreamResponse without an HttpResponse has been deprecated, and will be removed in the next major release. Code directly instantiating this class should be updated to provide an HttpResponse object as the first parameter to allow reading from raw HTTP response.
    • a722171: [feat] Add getRequestId() method to AzureOpenAiChatCompletionResponse, AzureOpenAiChatCompletionStreamResponse and AzureOpenAiEmbeddingResponse. The new method retrieves the request ID from the x-aicore-request-id response header, useful for debugging and tracking requests.
    • a722171: [feat] Add rawResponse property to AzureOpenAiChatCompletionStreamResponse. The new property exposes the raw HTTP response for advanced use cases such as accessing response headers.
    Patch Changes
    • Updated dependencies [8cb466a]
      • @sap-ai-sdk/core@2.10.0
      • @sap-ai-sdk/ai-api@2.10.0
  8. v2.9.0

    Fixes 1

    Notes
    Patch Changes
    • Updated dependencies [cd3d8ed]
      • @sap-ai-sdk/core@2.9.0
      • @sap-ai-sdk/ai-api@2.9.0
  9. v2.8.0

    Fixes 2

    Notes
    Patch Changes
    • @sap-ai-sdk/ai-api@2.8.0
    • @sap-ai-sdk/core@2.8.0
  10. v2.7.0

    Fixes 6

    Notes
    Patch Changes
    • Updated dependencies [b11b00c]
    • Updated dependencies [8616d5e]
    • Updated dependencies [56e9c3f]
    • Updated dependencies [8616d5e]
    • Updated dependencies [b12626b]
    • Updated dependencies [8616d5e]
      • @sap-ai-sdk/core@2.7.0
      • @sap-ai-sdk/ai-api@2.7.0
  11. v2.6.0

    Fixes 2

    Notes
    Patch Changes
    • @sap-ai-sdk/ai-api@2.6.0
    • @sap-ai-sdk/core@2.6.0
  12. v2.5.0

    Fixes 2

    Notes
    Patch Changes
    • @sap-ai-sdk/ai-api@2.5.0
    • @sap-ai-sdk/core@2.5.0
  13. v2.4.0

    Fixes 1

    Notes
    Patch Changes
    • Updated dependencies [2e1d2c2]
      • @sap-ai-sdk/core@2.4.0
      • @sap-ai-sdk/ai-api@2.4.0
  14. v2.3.0

    Fixes 2

    Notes
    Patch Changes
    • @sap-ai-sdk/ai-api@2.3.0
    • @sap-ai-sdk/core@2.3.0
  15. v2.2.0

    Fixes 4

    Notes
    Patch Changes
    • Updated dependencies [6100bca]
    • Updated dependencies [5225275]
    • Updated dependencies [347eac1]
    • Updated dependencies [58464e9]
      • @sap-ai-sdk/core@2.2.0
      • @sap-ai-sdk/ai-api@2.2.0
  16. v2.1.0

    Fixes 1

    Notes
    Patch Changes
    • Updated dependencies [0cf7d80]
      • @sap-ai-sdk/core@2.1.0
      • @sap-ai-sdk/ai-api@2.1.0
  17. v2.0.0dated in the atlas

    Breaking 3, Features 1, Fixes 3

    Notes
    Major Changes
    • 4c00c27: [Compatibility Note] Change stream method parameter from AbortController to AbortSignal. The stream() method now accepts an AbortSignal instead of an AbortController as the second parameter in both Azure OpenAI and Orchestration clients.
    • 5c52cb6: [Compatibility Note] Response object data property is renamed to _data. Use getter methods like getContent(), getTokenUsage(), getAssistantMessage() instead of direct data access.
    • 5c52cb6: [Compatibility Note] 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-models and must be imported from @sap-ai-sdk/foundation-models/internal.js instead.
      • Frequently used types (AzureOpenAiChatCompletionTool, AzureOpenAiFunctionObject, AzureOpenAiChatCompletionRequestMessage, AzureOpenAiChatCompletionRequestSystemMessage, AzureOpenAiChatCompletionRequestUserMessage, AzureOpenAiChatCompletionRequestAssistantMessage, AzureOpenAiChatCompletionRequestToolMessage) remain available from main package exports.
      • Add new type AzureOpenAiChatCompletionParameters to replace AzureOpenAiCreateChatCompletionRequest which is no longer exported publicly.
    Minor Changes
    • 5c52cb6: [New Functionality] Add getTokenUsage(), getFinishReason(), getContent(), getToolCalls(), getRefusal(), getAssistantMessage(), findChoiceByIndex() methods to Azure OpenAI chat completion response.
    Patch Changes
    • Updated dependencies [500c0dd]
    • Updated dependencies [9e1c43a]
    • Updated dependencies [14745de]
      • @sap-ai-sdk/core@2.0.0
      • @sap-ai-sdk/ai-api@2.0.0
  18. v1.17.0

    Fixes 2

    Notes
    Patch Changes
    • @sap-ai-sdk/ai-api@1.17.0
    • @sap-ai-sdk/core@1.17.0
  19. v1.16.0

    Features 1, Fixes 2

    Notes
    Minor Changes
    • e9c19b4: [New Functionality] Support Azure OpenAI streaming with tool calls.
    Patch Changes
    • @sap-ai-sdk/ai-api@1.16.0
    • @sap-ai-sdk/core@1.16.0
  20. v1.15.0

    Fixes 1

    Notes
    Patch Changes
    • Updated dependencies [5307dd0]
      • @sap-ai-sdk/core@1.15.0
      • @sap-ai-sdk/ai-api@1.15.0
  21. v1.14.0

    Fixes 2

    Notes
    Patch Changes
    • @sap-ai-sdk/ai-api@1.14.0
    • @sap-ai-sdk/core@1.14.0
  22. v1.13.0

    Fixes 2

    Notes
    Patch Changes
    • 8130838: [Fixed Issue] Remove incorrect error logging if finish reason is null in the streaming chunk.
    • Updated dependencies [a6ba3af]
      • @sap-ai-sdk/core@1.13.0
      • @sap-ai-sdk/ai-api@1.13.0
  23. v1.12.0

    Fixes 2

    Notes
    Patch Changes
    • @sap-ai-sdk/ai-api@1.12.0
    • @sap-ai-sdk/core@1.12.0
  24. v1.11.0

    Fixes 1

    Notes
    Patch Changes
    • Updated dependencies [627a152]
      • @sap-ai-sdk/core@1.11.0
      • @sap-ai-sdk/ai-api@1.11.0
  25. v1.10.0

    Fixes 1

    Notes
    Patch Changes
    • Updated dependencies [6f28f47]
      • @sap-ai-sdk/core@1.10.0
      • @sap-ai-sdk/ai-api@1.10.0
  26. v1.9.0

    Fixes 1

    Notes
    Patch Changes
    • Updated dependencies [bfed500]
      • @sap-ai-sdk/ai-api@1.9.0
      • @sap-ai-sdk/core@1.9.0
  27. v1.8.0

    Features 1, Fixes 2

    Notes
    Minor Changes
    • 09b0d2d: [Fixed Issue] Consider destination when resolving deployment ids.
    Patch Changes
    • Updated dependencies [09b0d2d]
    • Updated dependencies [1731104]
      • @sap-ai-sdk/ai-api@1.8.0
      • @sap-ai-sdk/core@1.8.0
  28. v1.7.0

    Fixes 2

    Notes
    Patch Changes
    • @sap-ai-sdk/ai-api@1.7.0
    • @sap-ai-sdk/core@1.7.0
  29. v1.6.0

    Fixes 2

    Notes
    Patch Changes
    • @sap-ai-sdk/ai-api@1.6.0
    • @sap-ai-sdk/core@1.6.0
  30. v1.5.0

    Features 1, Fixes 1

    Notes
    Minor Changes
    • b4a5506: [New Functionality] Add support for providing custom destination for AI Core besides using environment variable and service binding.
    Patch Changes
    • Updated dependencies [b4a5506]
      • @sap-ai-sdk/ai-api@1.5.0
      • @sap-ai-sdk/core@1.5.0
  31. v1.4.0

    Features 1, Fixes 2

    Notes
    Minor Changes
    • d79cee8: [New Functionality] Support streaming chat completion in the Azure OpenAI client in foundation-models.
    Patch Changes
    • @sap-ai-sdk/ai-api@1.4.0
    • @sap-ai-sdk/core@1.4.0
  32. v1.3.0

    Fixes 1

    Notes
    Patch Changes
    • 91df549: [Fixed Issue] Get choice via index by comparing the index property instead of using array index.
      • @sap-ai-sdk/ai-api@1.3.0
      • @sap-ai-sdk/core@1.3.0
  33. v1.2.0

    Features 2, Fixes 2

    Notes
    Minor Changes
    • 99498cd: [New Functionality] Add convenience method to access all embeddings in an Azure OpenAI response (AzureOpenAiEmbeddingResponse).
    • 99498cd: [Compatibility Note] Adjust AzureOpenAiEmbeddingOutput type to include multiple embedding responses as opposed to one.
    Patch Changes
    • @sap-ai-sdk/ai-api@1.2.0
    • @sap-ai-sdk/core@1.2.0
  34. v1.1.0

    Features 1, Fixes 7

    Notes
    Minor Changes
    • 771f986: [Fixed Issue] Fix sending the correct resource group headers when custom resource group is set.
    Patch Changes
    • 3cbfdc7: [Fixed Issue] Fix index-based data access in embedding response. Previously, the 0th index data was always returned.
    • 506a1e4: [Fixed Issue] Fix missing and unused dependencies.
    • Updated dependencies [506a1e4]
    • Updated dependencies [5bd2e4d]
    • Updated dependencies [5bd2e4d]
    • Updated dependencies [771f986]
    • Updated dependencies [5bd2e4d]
      • @sap-ai-sdk/ai-api@1.1.0
      • @sap-ai-sdk/core@1.1.0
  35. v1.0.0

    Breaking 1, Fixes 1

    Notes
    Major Changes
    • ba9133b: [New Functionality] Offer an OpenAI client to consume Azure OpenAI models for chat completion and embeddings via generative AI hub of SAP AI Core.
    Patch Changes
    • Updated dependencies [ba9133b]
      • @sap-ai-sdk/ai-api@1.0.0
      • @sap-ai-sdk/core@1.0.0
  36. v0.1.0

    Fixes 1

    Notes
    Patch Changes
    • Updated dependencies [4d5edc7]
      • @sap-ai-sdk/core@0.1.0
      • @sap-ai-sdk/ai-api@0.1.0
20,141downloads per week, npm
Weekly downloads for @sap-ai-sdk/foundation-models26 complete calendar weeks from 2026-04-27 to 2026-10-25; the latest total is 20141.27 Apr – 3 May: 9,7814 May – 10 May: 11,96111 May – 17 May: 15,23918 May – 24 May: 12,11725 May – 31 May: 17,1281 Jun – 7 Jun: 44,2108 Jun – 14 Jun: 82,60115 Jun – 21 Jun: 50,75322 Jun – 28 Jun: 58,23229 Jun – 5 Jul: 52,6656 Jul – 12 Jul: 50,90913 Jul – 19 Jul: 187,64320 Jul – 26 Jul: 100,80327 Jul – 2 Aug: 142,0033 Aug – 9 Aug: 117,10610 Aug – 16 Aug: 106,29717 Aug – 23 Aug: 145,46324 Aug – 30 Aug: 134,64431 Aug – 6 Sept: 84,8437 Sept – 13 Sept: 86,40014 Sept – 20 Sept: 84,09521 Sept – 27 Sept: 115,12628 Sept – 4 Oct: 131,5605 Oct – 11 Oct: 93,04912 Oct – 18 Oct: 49,94619 Oct – 25 Oct: 20,141
LLM integration
  1. llm_clientABAP client with one interface to chat-completion LLM APIsfrom ABAP
  2. abap-agent-runtimeABAP-native MCP endpoint that drives opted-in abap2UI5 appsfrom ABAP
  3. abap_btocs_ollamaB-Tocs ABAP SDK plugin connecting to Ollama modelsfrom ABAP
  4. SAP AI CoreAI runtime on BTP with the Generative AI Hubfrom BTP/BAIP
  5. cap-java/cds-aiBridge from CAP Java to SAP AI Core, with Fiori field recommendationsfrom CAP
  6. @cap-js/aiValue-help recommendations and SAP AI Core as a CAP servicefrom CAP
  7. cap-llm-pluginGenerative AI in CAP with fields anonymised through SAP HANAfrom CAP
  8. @geertjanklaps/cds-toon-ai-protocol-adapterProtocol adapter serving CAP data as TOON instead of JSONfrom CAP
  9. abap-sdk-nwas-xABAP client library for IBM watsonx.ai APIsfrom ABAP
  10. @jerome-benoit/sap-ai-providerVercel AI SDK provider for SAP AI Corefrom CAP
  11. ui5-cap-ai-featuresCDS plugin and UI5 controls for AI text features via SAP AI Corefrom CAP
  12. Microsoft AI SDK for SAPABAP library for calling Azure OpenAI and OpenAIfrom ABAP
  13. zllmABAP framework for chaining and orchestrating LLM callsfrom ABAP
  14. ABAP AI SDKSAP reuse library for calling large language models from ABAPfrom ABAP
  15. @sap-ai-sdk/ai-apiAI Core control plane API surface of SAP's AI SDKfrom CAP
  16. @sap-ai-sdk/coreShared internals of SAP's AI SDKfrom CAP
  17. @sap-ai-sdk/orchestrationOrchestration Service client for templating, grounding and maskingfrom CAP
  18. @sap-ai-sdk/prompt-registryClient for prompts kept in SAP's prompt registryfrom CAP
  19. @saptarishi/cds-plugin-llmCAP service kind putting eleven model providers behind one APIfrom CAP
  20. @shahid.la/cds-db-nlquery-mcpMCP server answering plain-English questions against a CDS schemafrom CAP
  21. @ui5/webcomponentsSAP's UI elements as standard custom elementsfrom UI5
  22. abap-sdk-nwasAn ABAP client library for IBM Watson's Discovery, Language Translator, Natural Language Understanding, Speech to Text, Text to Speech and Assistant services, installed through abapGit.from ABAP

Details

Sources5
npm registrydiscovered herechecked
The discovery passdiscovered herechecked
npm registry, @sap-ai-sdk/foundation-modelsversion, releases, installschecked
github.com/https://github.com/SAP/ai-sdk-jstree, pushes, contributors, CIchecked
packages/foundation-models/README.mdquoted, and what the entry declareschecked

Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.

Compatibility and provenance
latestv2.17.0
first release
releases and cadence786, ~0d median
discovered vianpm registry, The discovery pass
first seen in the atlas
ecosystem and domaincap, ai-and-agents
Contributors21
History in the atlas4
  1. the stream method named, the foundation-models chat-completion page cited, and both properties the capability declares
  2. Typed cds-plugin by placement, which defaults every candidate to that. It is not one.
  3. Calls foundation models through SAP AI Core and the Generative AI Hub, which is the package an application actually reaches for.
  4. First seen.
For your agent
Ref
artifact:sap-ai-sdk-foundation-models
JSON
/artifacts/sap-ai-sdk-foundation-models.json
MCP
Connecting an agent