Skip to content

Handle provider model-change restrictions#1

Merged
Jaaneek merged 1 commit into
feat/grok-providerfrom
stack/grok-model-change-policy
Jun 4, 2026
Merged

Handle provider model-change restrictions#1
Jaaneek merged 1 commit into
feat/grok-providerfrom
stack/grok-model-change-policy

Conversation

@Jaaneek
Copy link
Copy Markdown
Owner

@Jaaneek Jaaneek commented Jun 4, 2026

image
  • Add provider-level metadata for models that require a new thread before changing models

  • Enforce the restriction in ProviderCommandReactor and expose a UI preflight warning through ChatView logic

  • Cover Grok metadata, server rejection, and ChatView logic with focused tests

Comment on lines +3643 to +3658
const modelChangeBlockReason = getStartedThreadModelChangeBlockReason({
providers: providerStatuses,
hasStartedSession: activeThread.session !== null,
currentModelSelection: activeThread.modelSelection,
currentProviderInstanceId: activeThread.session?.providerInstanceId ?? null,
nextModelSelection,
});
if (modelChangeBlockReason) {
toastManager.add({
type: "warning",
title: modelChangeBlockReason.title,
description: modelChangeBlockReason.description,
});
scheduleComposerFocus();
return;
}
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if this shouldnt jsut be in if statement?

@Jaaneek Jaaneek merged commit b6b8e4a into feat/grok-provider Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant