759
this._provisionalModel = model;
760
if (this._pipeline) {
762
>
// Always push the resolved effort, including `undefined`. Switching
763
>
// to a model that does not support reasoning effort (e.g. Haiku)
764
>
// resolves to `undefined`, which must actively CLEAR any effort the
765
>
// SDK is still applying from a prior effort-capable model — otherwise
766
>
// the next turn replays e.g. `'high'` onto Haiku and the API 400s
767
>
// (`output_config.effort ... does not support reasoning effort`).
768
>
await this._pipeline.setEffort(toRuntimeEffortLevel(resolveClaudeEffort(model)));
769
>
}
770
await this._metadataStore.write(this._storageUri, { model });
771
}