Per-config stream options that override shared settings. Use object numeric keys for config indices you want to override. Omit keys for configs that should use shared options or set their value to undefined.
const optionsWithOverrides: StreamOptions = {
global: { chunk_size: 100 },
promptTemplating: { include_usage: false },
overrides: {
0: { promptTemplating: { include_usage: true } }, // config 0, replaces base options fully
// 1: resolves base options because no override is provided (`{ promptTemplating: { include_usage: false } }`)
2: { outputFiltering: { overlap: 50 } } // config 2, replaces base options fully
}
};
Copyright Ⓒ 2026 SAP SE or an SAP affiliate company. All rights reserved.
Stream options with support for per-config overrides in module fallback scenarios. The
overridesproperty allows you to specify stream options that apply to specific module configurations by their index in the fallback list. If an override is not provided for a config, it will use the shared options defined inBaseStreamOptions. Overrides do not merge with shared options.