aicore-sdk-js
Installation
SKILL.md
Rules
- If no deployment URL is known, check the SAP AI Core console or contact your admin to list or create one before generating code.
- Always include
aicore configurecredential guidance in generated code comments; link to Connecting to AI Core for setup details. - JS/TS lifecycle management (create/list/delete deployments) is not available in this skill — use the SAP AI Core console or contact your admin for deployment management.
- Target
@sap-ai-sdkv2 (orchestration2.14+). The preferred invocation pattern is passingmessagesdirectly tochatCompletion()/stream(). Only usepromptTemplating.prompt.templatewith{{?placeholder}}values when the user explicitly wants a server-side reusable template. Never emit the v1 shapellm: { model_name }/templating: { template }— it does not compile against v2. - Never emit Python code snippets — this skill is JS/TS only. If the user asks for Python, inform them that no Python skill is available in this repo and point them to https://sap.github.io/ai-sdk/ for Python SDK guidance.
- Gather these details before generating code — ask only for what the user hasn't provided:
- Framework:
@sap-ai-sdk/*(recommended) /@sap-ai-sdk/langchain(LangChain) / OpenAI npm package via LiteLLM proxy? - Use case: chat / streaming / embeddings?
- Runtime: Node.js / Bun / browser?
- Model + Deployment ID: check the SAP AI Core console for existing deployments
- Model-switching intent (ask only when the user specifies an OpenAI model like gpt-4o, gpt-4.1, etc.): do they plan to switch models later (e.g. to Claude or Gemini)? If yes → recommend
@sap-ai-sdk/orchestrationfor portability. If they want to stay on OpenAI → use@sap-ai-sdk/openai(SapOpenAi.createClient) as the simpler native OpenAI SDK alternative; no LiteLLM proxy needed.
- Framework:
Sources & Fallback
Use the best source available, in this order. Never block on a source that isn't present.