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:
@@ -489,7 +489,11 @@ export class CodingConversationService {
|
||||
try {
|
||||
selected = await this.runtime.validateModel(model);
|
||||
} catch (error) { runtimeError(error); }
|
||||
if (conversation.modelResolution === 'resolved' && conversation.model) {
|
||||
// A dormant Conversation must not need its previous model to start in order
|
||||
// to select a replacement (the previous model may have been removed).
|
||||
await this.prepareFlights.get(conversationId)?.catch(() => undefined);
|
||||
const worker = this.runtime.getDiagnostics().workers.find((item) => item.conversationId === conversationId);
|
||||
if (conversation.modelResolution === 'resolved' && conversation.model && worker) {
|
||||
await this.ensurePrepared(conversationId);
|
||||
let snapshot: ConversationSnapshot;
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user