fix: allow replacing unavailable conversation models
Persist the selected model before opening dormant sessions, and reconfigure crashed workers on the same account. Preserve session history and report model removal through the model-unavailable contract instead of a generic runtime failure.
This commit is contained in:
@@ -945,7 +945,8 @@ export class PiConversationRuntime implements CodingConversationRuntime {
|
||||
},
|
||||
modelResolution: 'resolved',
|
||||
};
|
||||
if (snapshot.conversation.model.model?.accountId !== selection.accountId) {
|
||||
if (snapshot.conversation.model.model?.accountId !== selection.accountId
|
||||
|| this.pool.getState(input.conversationId)?.state === 'crashed') {
|
||||
const persisted = await this.registry.setModel(input.conversationId, model);
|
||||
this.replaceModel(input.conversationId, persisted);
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user