From d0e0eea7b856f1e5b751a7446c2b6021b592ff5c Mon Sep 17 00:00:00 2001 From: John Feng Date: Tue, 5 May 2026 12:39:36 +0800 Subject: [PATCH] update based on copilot review --- cmd/picoclaw/internal/model/command.go | 9 ++++---- pkg/audio/asr/asr_test.go | 29 ++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/cmd/picoclaw/internal/model/command.go b/cmd/picoclaw/internal/model/command.go index c06fd31e3..4de76951b 100644 --- a/cmd/picoclaw/internal/model/command.go +++ b/cmd/picoclaw/internal/model/command.go @@ -30,12 +30,13 @@ Examples: picoclaw model # Show current default model picoclaw model gpt-5.2 # Set gpt-5.2 as default picoclaw model claude-sonnet-4.6 # Set claude-sonnet-4.6 as default - picoclaw model local-model # Set local vLLM/OVMS server as default + picoclaw model local-model # Set local vLLM server as default + picoclaw model local-ovms # Set local OVMS server as default picoclaw model add -b URL -k KEY # Add a model from a custom endpoint -Note: 'local-model' is a special value for using a local OpenAI-compatible server -(running at localhost:8000 by default) which does not require an API key. -It can be configured to point to vLLM, OVMS (OpenVINO Model Server), or other OpenAI-compatible servers.`, +Note: 'local-model' is a built-in entry for a local vLLM server (localhost:8000/v1). + 'local-ovms' is a built-in entry for a local OVMS server (localhost:8000/v3). + Neither requires an API key.`, Args: cobra.MaximumNArgs(1), RunE: func(cmd *cobra.Command, args []string) error { configPath := internal.GetConfigPath() diff --git a/pkg/audio/asr/asr_test.go b/pkg/audio/asr/asr_test.go index 0970d69f4..42e150e4e 100644 --- a/pkg/audio/asr/asr_test.go +++ b/pkg/audio/asr/asr_test.go @@ -206,6 +206,35 @@ func TestDetectTranscriber(t *testing.T) { }, wantName: "audio-model", }, + { + name: "ovms voice model name selects audio model transcriber", + cfg: &config.Config{ + Voice: config.VoiceConfig{ModelName: "local-ovms"}, + ModelList: []*config.ModelConfig{ + { + ModelName: "local-ovms", + Model: "ovms/custom-model", + APIBase: "http://localhost:8000/v3", + }, + }, + }, + wantName: "audio-model", + }, + { + name: "ovms voice model name with whisper model selects whisper transcriber", + cfg: &config.Config{ + Voice: config.VoiceConfig{ModelName: "local-ovms"}, + ModelList: []*config.ModelConfig{ + { + ModelName: "local-ovms", + Model: "ovms/whisper-large-v3", + APIBase: "http://localhost:8000/v3", + APIKeys: config.SimpleSecureStrings("sk-ovms-test"), + }, + }, + }, + wantName: "whisper", + }, } for _, tc := range tests {