# Class OrchestrationClient

Get the orchestration client.

- Defined in packages/orchestration/dist/orchestration-client.d.ts:12

##### Index

### Constructors

constructor

### Methods

chatCompletion
stream

## Constructors

### constructor

- new OrchestrationClient(
  config:
  | string
  | Xor<
  OrchestrationConfigRef,
  OrchestrationModuleConfig
  | OrchestrationModuleConfigList,
  >,
  deploymentConfig?: DeploymentIdConfig | ResourceGroupConfig,
  destination?:
  | never
  | Without<HttpDestination> & DestinationFetchOptions & {
  serviceBindingTransformFn?: ServiceBindingTransformFunction;
  } & { destinationName: string; service?: undefined }
  | Without<
  DestinationFetchOptions & {
  serviceBindingTransformFn?: ServiceBindingTransformFunction;
  } & { destinationName: string; service?: undefined },
  > & Destination & { url: string },
  ): OrchestrationClient

  Creates an instance of the orchestration client.

  #### Parameters

  - config:
    | string
    | Xor<
    OrchestrationConfigRef,
    OrchestrationModuleConfig
    | OrchestrationModuleConfigList,
    >

    Orchestration configuration. Can be:

    - An `OrchestrationModuleConfig` object for inline configuration
    - An `OrchestrationModuleConfigList` array for module fallback (tries each config in order until one succeeds)
    - A JSON string obtained from AI Launchpad
    - An object of type`OrchestrationConfigRef` to reference a stored configuration by ID or name.
  - `Optional` deploymentConfig: DeploymentIdConfig | ResourceGroupConfig

    Deployment configuration.

  - `Optional` destination:
    | never
    | Without<HttpDestination> & DestinationFetchOptions & {
    serviceBindingTransformFn?: ServiceBindingTransformFunction;
    } & { destinationName: string; service?: undefined }
    | Without<
    DestinationFetchOptions & {
    serviceBindingTransformFn?: ServiceBindingTransformFunction;
    } & { destinationName: string; service?: undefined },
    > & Destination & { url: string }

    The destination to use for the request.

    - never
    - Without<HttpDestination> & DestinationFetchOptions & {
      serviceBindingTransformFn?: ServiceBindingTransformFunction;
      } & { destinationName: string; service?: undefined }

      - ##### `Optional` serviceBindingTransformFn?: ServiceBindingTransformFunction

        Custom transformation function to control how a Destination is built from the given Service.

      - ##### destinationName: string

        The name of the destination to retrieve from service bindings.

      - ##### `Optional` service?: undefined

    - Without<
      DestinationFetchOptions & {
      serviceBindingTransformFn?: ServiceBindingTransformFunction;
      } & { destinationName: string; service?: undefined },
      > & Destination & { url: string }

  #### Returns OrchestrationClient

  - Defined in packages/orchestration/dist/orchestration-client.d.ts:26

## Methods

### chatCompletion

- chatCompletion(
  request?: ChatCompletionRequest,
  requestConfig?: Pick<
  HttpRequestConfig,
  | "middleware"
  | "maxContentLength"
  | "proxy"
  | "httpAgent"
  | "httpsAgent"
  | "parameterEncoder"
  | "signal",
  > & Record<string, any> & { headers?: OrchestrationRequestHeaders },
  ): Promise<OrchestrationResponse>

  Send a chat completion request to the orchestration service.

  #### Parameters

  - `Optional` request: ChatCompletionRequest

    Request containing messages, placeholder values, and message history.

  - `Optional` requestConfig: Pick<
    HttpRequestConfig,
    | "middleware"
    | "maxContentLength"
    | "proxy"
    | "httpAgent"
    | "httpsAgent"
    | "parameterEncoder"
    | "signal",
    > & Record<string, any> & { headers?: OrchestrationRequestHeaders }

    Additional request configuration. Use `requestConfig.headers` to pass service-specific headers:

    - `AI-Object-Store-Secret-Name`: Name of the object store secret used by the feedback service.

  #### Returns Promise<OrchestrationResponse>

  The orchestration service response.

  - Defined in packages/orchestration/dist/orchestration-client.d.ts:34

### stream

- stream(
  request?: ChatCompletionRequest,
  signal?: AbortSignal,
  options?: StreamOptions,
  requestConfig?: Pick<
  HttpRequestConfig,
  | "middleware"
  | "maxContentLength"
  | "proxy"
  | "httpAgent"
  | "httpsAgent"
  | "parameterEncoder"
  | "signal",
  > & Record<string, any> & { headers?: OrchestrationRequestHeaders },
  ): Promise<OrchestrationStreamResponse<OrchestrationStreamChunkResponse>>

  Create a streaming chat completion request to the orchestration service.

  #### Parameters

  - `Optional` request: ChatCompletionRequest

    Request containing messages, placeholder values, and message history.

  - `Optional` signal: AbortSignal

    An abort signal to cancel the request.

  - `Optional` options: StreamOptions

    Streaming options, e.g., for input/output filtering.

  - `Optional` requestConfig: Pick<
    HttpRequestConfig,
    | "middleware"
    | "maxContentLength"
    | "proxy"
    | "httpAgent"
    | "httpsAgent"
    | "parameterEncoder"
    | "signal",
    > & Record<string, any> & { headers?: OrchestrationRequestHeaders }

    Additional request configuration. Use `requestConfig.headers` to pass service-specific headers:

    - `AI-Object-Store-Secret-Name`: Name of the object store secret used by the feedback service.

  #### Returns Promise<OrchestrationStreamResponse<OrchestrationStreamChunkResponse>>

  The orchestration stream response.

  Copyright Ⓒ 2026 SAP SE or an SAP affiliate company. All rights reserved.

  - Defined in packages/orchestration/dist/orchestration-client.d.ts:46