prefixLength

The maximum length of the prefix used for routing decisions. Required when RoutingStrategy is PREFIX_AWARE.

  • For the SageMaker Runtime InvokeEndpoint and InvokeEndpointWithResponseStream APIs, this value specifies the number of bytes from the beginning of the request body.

  • For OpenAI-compatible API, this value specifies the number of characters from the text content of the messages array.

The endpoint routes requests that share the same prefix to the same instance. Set this value to cover shared content (such as system prompts) plus enough unique content to distribute workloads across instances.