Skip to content

Function Calling with Gemini Model via SAP AI Core Orchestration Fails with 400 Bad Request #51

@Mhidayah19

Description

@Mhidayah19

Issue description

This issue was initially posted on SAP/ai-sdk-js #790, but after further investigation, it appears that the root cause is not related to the SDK itself but rather to the behavior on the orchestration/service side of SAP AI Core.

The orchestration seems to be terminating the session prematurely for Gemini model and returning unexpected 400 errors during normal inference requests. These errors are not tied to invalid credentials or SDK usage but point to backend/session handling issues on the AI Core side.

I’m posting this here to bring attention to the service layer issue and to seek guidance or resolution from the appropriate documentation or service team.

Feedback Type
Bug report / Service behavior feedback

Page Title on SAP Help Portal (prefilled)
Tool Calling

Page URL on SAP Help Portal (prefilled)
https://help.sap.com/docs/AI_CORE/2d6c5984063c40a59eda62f4a9135bee/tool-calling?locale=en-US&state=PRODUCTION&version=CLOUD&q=tool

Additional Reference (SDK Documentation)
https://sap.github.io/ai-sdk/docs/js/orchestration/chat-completion#function-calling

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions