.Net: Enable the possibility to select another service using `IPromptRenderFilter`.
Describe the bug
The current PromptRenderFiltering happens after the service was selected in the Kernel, even changing the context.Arguments.ExecutionSettings.First().Value.ServiceId won't be effective.
Expected behavior Since prompt rendering happens before calling the connector, seems to be an error not be able to override that configuration and select a new connector serviceId from the filter context settings.
This is a new feature and not a bug, adding to the backlog so we can prioritise this.
In my opinion, we should clearly define the responsibility of each filter. IPromptRenderFilter is related to prompt rendering operation only, I'm not sure it should have an ability to pick AI service. If it's important to select another service in the middle of the execution, it's possible to use IFunctionInvocationFilter, we have an example how to do it:
https://github.com/microsoft/semantic-kernel/blob/a53b96a1ae066160872b3cad65387442995a788d/dotnet/samples/Concepts/Filtering/RetryWithFilters.cs#L49-L70
There is a clear use-case for IFunctionInvocationFilter, when function invocation fails and user wants to try the same function with different model. I'm wondering, what could possibly happen during prompt rendering operation that it will be necessary to change AI service inside IPromptRenderFilter. If there is some use-case, it would be great to discuss it further.