Skip to content

Commit eeda702

Browse files
committed
improvement(mothership): relabel the Sol pick GPT-6.1 Sol and retire the none effort
1 parent 8760ca7 commit eeda702

4 files changed

Lines changed: 24 additions & 23 deletions

File tree

‎apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/model-selector.tsx‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ import {
1010
} from '@sim/emcn'
1111
import { Brain, Check, Sparkles } from '@sim/emcn/icons'
1212
import {
13+
MOTHERSHIP_EFFORT_OPTIONS,
1314
MOTHERSHIP_MODEL_OPTIONS,
1415
MOTHERSHIP_SIMPLE_EFFORT_OPTIONS,
1516
type MothershipEffort,
16-
mothershipEffortOptions,
1717
resolveMothershipModelSettings,
1818
} from '@/lib/mothership/model-options'
1919
import { useChatSurface } from '@/app/workspace/[workspaceId]/home/components/chat-surface-context'
@@ -45,9 +45,7 @@ export function ModelSelector() {
4545
{ effort: effortChoice ?? undefined, modelSelection: selection },
4646
advanced
4747
)
48-
const options = modelSelection
49-
? mothershipEffortOptions(modelSelection.model)
50-
: MOTHERSHIP_SIMPLE_EFFORT_OPTIONS
48+
const options = modelSelection ? MOTHERSHIP_EFFORT_OPTIONS : MOTHERSHIP_SIMPLE_EFFORT_OPTIONS
5149
const setEffort = (choice: MothershipEffort) => {
5250
if (chatId) saveChatEffort(choice)
5351
else setNewChatEffort(choice)

‎apps/sim/lib/mothership/chat/application/set-effort.integration.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@ describe('a chat keeps the effort its owner picked', () => {
9999
expect(await nextTurnEffort(chatId)).toBe('high')
100100
})
101101

102+
it('runs a chat whose stored pick is the retired none effort at low', async () => {
103+
const chatId = await createChat({ effort: 'none' })
104+
expect(await nextTurnEffort(chatId)).toBe('low')
105+
})
106+
102107
it("refuses to change another user's chat in a shared workspace", async () => {
103108
const chatId = await createChat(null)
104109
await expect(

‎apps/sim/lib/mothership/chat/post.test.ts‎

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -815,7 +815,7 @@ describe('handleUnifiedChatPost', () => {
815815
['xhigh', 'xhigh'],
816816
['max', 'xhigh'],
817817
['low', 'low'],
818-
['none', 'high'],
818+
['none', 'low'],
819819
])(
820820
'leaves the model to the worker and enforces the effort range on submitted %s effort',
821821
async (effort, expected) => {
@@ -838,16 +838,19 @@ describe('handleUnifiedChatPost', () => {
838838
}
839839
)
840840

841+
const solSelection = { model: 'gpt-6-sol', fastMode: false } as const
841842
it.each([
842-
{ stored: null, sent: undefined, runs: 'high' },
843-
{ stored: 'medium', sent: undefined, runs: 'medium' },
844-
{ stored: 'low', sent: undefined, runs: 'low' },
845-
{ stored: 'high', sent: 'low', runs: 'low' },
846-
{ stored: 'high', sent: 'max', runs: 'xhigh' },
843+
{ stored: null, sent: undefined, runs: 'high', modelSelection: undefined },
844+
{ stored: 'medium', sent: undefined, runs: 'medium', modelSelection: undefined },
845+
{ stored: 'low', sent: undefined, runs: 'low', modelSelection: undefined },
846+
{ stored: 'high', sent: 'low', runs: 'low', modelSelection: undefined },
847+
{ stored: 'high', sent: 'max', runs: 'xhigh', modelSelection: undefined },
848+
{ stored: 'none', sent: undefined, runs: 'low', modelSelection: solSelection },
849+
{ stored: 'high', sent: 'none', runs: 'low', modelSelection: solSelection },
847850
] as const)(
848-
'runs a chat whose stored effort choice is $stored at $runs when the send names $sent',
849-
async ({ stored, sent, runs }) => {
850-
flags.models.mockResolvedValue(false)
851+
'runs a chat whose stored effort choice is $stored at $runs when the send names $sent with $modelSelection',
852+
async ({ stored, sent, runs, modelSelection }) => {
853+
flags.models.mockResolvedValue(Boolean(modelSelection))
851854
resolveOrCreateChat.mockResolvedValue({
852855
chatId: 'chat-1',
853856
chat: { id: 'chat-1', effort: stored },
@@ -860,13 +863,14 @@ describe('handleUnifiedChatPost', () => {
860863
message: 'Continue',
861864
workspaceId: 'ws-1',
862865
chatId: 'chat-1',
866+
...(modelSelection ? { modelSelection } : {}),
863867
...(sent ? { effort: sent } : {}),
864868
}),
865869
})
866870
)
867871
expect(response.status).toBe(200)
868872
expect(buildCopilotRequestPayload).toHaveBeenCalledWith(
869-
expect.objectContaining({ effort: runs })
873+
expect.objectContaining({ effort: runs, modelSelection })
870874
)
871875
expect(admitTurn.mock.calls[0][0].input.effortChoice).toBe(sent && runs)
872876
}

‎apps/sim/lib/mothership/model-options.ts‎

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export const MOTHERSHIP_EFFORT_OPTIONS: Array<{ value: MothershipEffort; label:
1313

1414
export const MOTHERSHIP_MODEL_OPTIONS = [
1515
{ value: 'gpt-6-astra', label: 'GPT-6 Astra' },
16-
{ value: 'gpt-6-sol', label: 'GPT-6 Sol' },
16+
{ value: 'gpt-6-sol', label: 'GPT-6.1 Sol' },
1717
{ value: 'claude-opus-5-5', label: 'Opus 5.5' },
1818
] satisfies Array<{ value: ModelSelection['model']; label: string }>
1919

@@ -32,12 +32,6 @@ export const MOTHERSHIP_SIMPLE_EFFORT_OPTIONS = MOTHERSHIP_EFFORT_OPTIONS.filter
3232
SIMPLE_EFFORT_VALUES.has(option.value)
3333
)
3434

35-
export function mothershipEffortOptions(model: ModelSelection['model']) {
36-
return model === 'gpt-6-sol'
37-
? [{ value: 'none' as const, label: 'None' }, ...MOTHERSHIP_EFFORT_OPTIONS]
38-
: MOTHERSHIP_EFFORT_OPTIONS
39-
}
40-
4135
/**
4236
* Shared by the visible controls, send path and server admission so hidden preferences cannot leak.
4337
* Without the model picker no selection is sent, so the worker routes every model role itself.
@@ -47,15 +41,15 @@ export function resolveMothershipModelSettings(
4741
advanced: boolean
4842
): { effort: MothershipEffort; modelSelection: ModelSelection | undefined } {
4943
let effort = settings.effort ?? DEFAULT_MOTHERSHIP_EFFORT
44+
// No served model reasons at `none`; a pick stored before it was retired runs at the nearest effort.
45+
if (effort === 'none') effort = 'low'
5046
if (!advanced) {
51-
if (effort === 'none') effort = DEFAULT_MOTHERSHIP_EFFORT
5247
if (effort === 'max') effort = 'xhigh'
5348
return { effort, modelSelection: undefined }
5449
}
5550
const modelSelection = normalizeModelSelection(
5651
settings.modelSelection ?? { model: 'gpt-6-astra', fastMode: false }
5752
)
58-
if (effort === 'none' && modelSelection.model !== 'gpt-6-sol') effort = DEFAULT_MOTHERSHIP_EFFORT
5953
return { effort, modelSelection }
6054
}
6155

0 commit comments

Comments
 (0)