From cec8795b53d4cad91af6f26beb965b0f2998c0cd Mon Sep 17 00:00:00 2001 From: M57 <41645758+Hy4ri@users.noreply.github.com> Date: Wed, 8 Jul 2026 13:00:42 +0300 Subject: [PATCH] fix(#497): pass include_unconfigured=true to /api/model/options (#498) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backend commit 37a4cf900 (hermes-agent) flipped the default of GET /api/model/options's include_unconfigured parameter from true to false, so the mobile Models picker was silently regressing to showing only configured/authenticated providers — the skeleton rows for unconfigured providers (with setup-hint warnings) stopped arriving. Add include_unconfigured as a @Query param defaulting to true so the full provider universe is restored on the Models screen. Both current call sites (ModelViewModel + ProfilesViewModel) invoke the API without passing the new param, so they automatically pick up the true default. --- .../com/m57/hermescontrol/data/remote/HermesApiService.kt | 1 + .../test/java/com/m57/hermescontrol/E2eIntegrationTest.kt | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/m57/hermescontrol/data/remote/HermesApiService.kt b/app/src/main/java/com/m57/hermescontrol/data/remote/HermesApiService.kt index ea588208..09868faf 100644 --- a/app/src/main/java/com/m57/hermescontrol/data/remote/HermesApiService.kt +++ b/app/src/main/java/com/m57/hermescontrol/data/remote/HermesApiService.kt @@ -432,6 +432,7 @@ interface HermesApiService { @GET("api/model/options") suspend fun getModelOptions( @Query("refresh") refresh: Boolean = false, + @Query("include_unconfigured") includeUnconfigured: Boolean = true, ): Response @GET("api/model/auxiliary") diff --git a/app/src/test/java/com/m57/hermescontrol/E2eIntegrationTest.kt b/app/src/test/java/com/m57/hermescontrol/E2eIntegrationTest.kt index 503e4494..69c3e790 100644 --- a/app/src/test/java/com/m57/hermescontrol/E2eIntegrationTest.kt +++ b/app/src/test/java/com/m57/hermescontrol/E2eIntegrationTest.kt @@ -1285,7 +1285,7 @@ class E2eIntegrationTest { val provider = ModelProvider("ollama", "Ollama", false, true, listOf("llama3"), 1, null, true, null, null) val profile = ProfileInfo("default", null, true, "llama3", "ollama", null, null, null, null) - coEvery { mockApiService.getModelOptions(any()) } returns + coEvery { mockApiService.getModelOptions(any(), any()) } returns Response.success(ModelOptionsResponse(listOf(provider))) coEvery { mockApiService.getActiveProfile() } returns Response.success(ActiveProfileResponse("default", null)) @@ -1340,7 +1340,7 @@ class E2eIntegrationTest { val provider = ModelProvider("ollama", "Ollama", false, true, listOf("llama3"), 1, null, true, null, null) val profile = ProfileInfo("default", null, true, "llama3", "ollama", null, null, null, null) - coEvery { mockApiService.getModelOptions(any()) } returns + coEvery { mockApiService.getModelOptions(any(), any()) } returns Response.success(ModelOptionsResponse(listOf(provider))) coEvery { mockApiService.getActiveProfile() } returns Response.success(ActiveProfileResponse("default", null)) @@ -1364,7 +1364,7 @@ class E2eIntegrationTest { ) val capturedRefresh = mutableListOf() - coEvery { mockApiService.getModelOptions(any()) } answers { + coEvery { mockApiService.getModelOptions(any(), any()) } answers { capturedRefresh.add(firstArg()) Response.success(ModelOptionsResponse(listOf(provider))) }