Skip to content

The agent that grows with you

test(desktop): Priority new chats send fast alone, never service_tier

kshitijk4poor595d29fd81ef
diff --git a/apps/desktop/src/app/session/hooks/use-session-actions.test.tsx b/apps/desktop/src/app/session/hooks/use-session-actions.test.tsx
index 23d3cc2ab49..0505f0a0ab7 100644
--- a/apps/desktop/src/app/session/hooks/use-session-actions.test.tsx
+++ b/apps/desktop/src/app/session/hooks/use-session-actions.test.tsx
@@ -80,6 +80,7 @@ import {
setCurrentModelSource,
setCurrentProvider,
setCurrentReasoningEffort,
+ setCurrentServiceTier,
setMessages,
setMessagingSessions,
setNewChatWorkspaceTarget,
@@ -1507,7 +1508,7 @@ describe('createBackendSessionForSend profile routing', () => {
expect(ambientRequest).not.toHaveBeenCalledWith('session.create', expect.anything())
})
- it('freezes the visible selector state before profile readiness and sends fast: false explicitly', async () => {
+ it('freezes the visible selector state before profile readiness and sends Priority as fast alone', async () => {
const profileReady = deferred<void>()
vi.mocked(ensureGatewayProfile).mockReturnValueOnce(profileReady.promise)
@@ -1518,7 +1519,9 @@ describe('createBackendSessionForSend profile routing', () => {
// rides along as a per-session override.
setCurrentModelSource('manual')
setCurrentReasoningEffort('high')
- setCurrentFastMode(false)
+ setCurrentFastMode(true)
+ // Priority rides as `fast` alone: a pre-Ultrafast backend rejects `service_tier`.
+ setCurrentServiceTier('priority')
let createParams: Record<string, unknown> | undefined
@@ -1547,7 +1550,8 @@ describe('createBackendSessionForSend profile routing', () => {
setCurrentModel('openai/gpt-5.5')
setCurrentProvider('openai-codex')
setCurrentReasoningEffort('low')
- setCurrentFastMode(true)
+ setCurrentFastMode(false)
+ setCurrentServiceTier('ultrafast')
profileReady.resolve()
await act(async () => {
@@ -1555,11 +1559,12 @@ describe('createBackendSessionForSend profile routing', () => {
})
expect(createParams).toMatchObject({
- fast: false,
+ fast: true,
model: 'anthropic/claude-sonnet-4.6',
provider: 'anthropic',
reasoning_effort: 'high'
})
+ expect(createParams).not.toHaveProperty('service_tier')
})
it('falls back to the entered project cwd when the current cwd is blank', async () => {