The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(desktop): Model settings reads for an "Applies to" profile dial foreground
teknium1bd626ec1ae44
diff --git a/apps/desktop/src/api/models.ts b/apps/desktop/src/api/models.tsindex 9f3e34ecf83..0c350c22c00 100644--- a/apps/desktop/src/api/models.ts+++ b/apps/desktop/src/api/models.ts@@ -9,11 +9,19 @@ import type {ModelInfoResponse} from '@/types/hermes'-import { capabilityScoped, hermesApi, type ProfileScope, profileScoped, STARTUP_REQUEST_TIMEOUT_MS } from './client'+import {+ capabilityScoped,+ hermesApi,+ type ProfileScope,+ profileScoped,+ scopedDialPriority,+ STARTUP_REQUEST_TIMEOUT_MS+} from './client'export function getGlobalModelInfo(profile?: null | string): Promise<ModelInfoResponse> {return hermesApi<ModelInfoResponse>({...profileScoped(profile),+ ...scopedDialPriority(profile),path: '/api/model/info',timeoutMs: STARTUP_REQUEST_TIMEOUT_MS})@@ -50,6 +58,7 @@ export function getGlobalModelOptions(return hermesApi<ModelOptionsResult>({...profileScoped(profile),+ ...scopedDialPriority(profile),path: params.size > 0 ? `/api/model/options?${params.toString()}` : '/api/model/options',timeoutMs: STARTUP_REQUEST_TIMEOUT_MS})@@ -71,6 +80,7 @@ export function getRecommendedDefaultModel(): Promise<RecommendedDefaultModel> {return hermesApi<RecommendedDefaultModel>({...profileScoped(profile),+ ...scopedDialPriority(profile),path: `/api/model/recommended-default?provider=${encodeURIComponent(provider)}`})}@@ -94,6 +104,7 @@ export function setGlobalModel(export function getAuxiliaryModels(profile?: null | string): Promise<AuxiliaryModelsResponse> {return hermesApi<AuxiliaryModelsResponse>({...profileScoped(profile),+ ...scopedDialPriority(profile),path: '/api/model/auxiliary'})}@@ -101,6 +112,7 @@ export function getAuxiliaryModels(profile?: null | string): Promise<AuxiliaryMoexport function getMoaModels(profile?: null | string): Promise<MoaConfigResponse> {return hermesApi<MoaConfigResponse>({...profileScoped(profile),+ ...scopedDialPriority(profile),path: '/api/model/moa'})}@@ -111,6 +123,7 @@ export function saveMoaModels(): Promise<MoaConfigResponse & { ok: boolean }> {return hermesApi<MoaConfigResponse & { ok: boolean }>({...profileScoped(profile),+ ...scopedDialPriority(profile),path: '/api/model/moa',method: 'PUT',body@@ -123,6 +136,7 @@ export function setModelAssignment(): Promise<ModelAssignmentResponse> {return hermesApi<ModelAssignmentResponse>({...profileScoped(profile),+ ...scopedDialPriority(profile),path: '/api/model/set',method: 'POST',bodydiff --git a/apps/desktop/src/hermes-capability-scope.test.ts b/apps/desktop/src/hermes-capability-scope.test.tsindex bba6745f6db..e1f24cfe046 100644--- a/apps/desktop/src/hermes-capability-scope.test.ts+++ b/apps/desktop/src/hermes-capability-scope.test.ts@@ -1,5 +1,6 @@import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'+import { getAuxiliaryModels, getGlobalModelInfo } from './api/models'import {getHermesConfigRecord,getMcpCatalog,@@ -82,11 +83,21 @@ describe('capability helpers are connection-scoped', () => {void getSkills('coder')expect(last()).toMatchObject({ profile: 'coder', priority: 'foreground' })++ // The Model page fires these alongside the config record for the same+ // scope; an untagged sibling would queue as background work again.+ void getGlobalModelInfo('coder')+ expect(last()).toMatchObject({ profile: 'coder', priority: 'foreground' })++ void getAuxiliaryModels('coder')+ expect(last()).toMatchObject({ profile: 'coder', priority: 'foreground' })})it('keeps ambient config reads unprioritized for background hydration', () => {getHermesConfigRecord()+ expect(last()).not.toHaveProperty('priority')+ void getGlobalModelInfo()expect(last()).not.toHaveProperty('priority')})