qwen-audio-agent 1.8.3 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -26,6 +26,8 @@ tells you:
26
26
 
27
27
  ## News
28
28
 
29
+ - **2026-08-13 · [v1.9.0](https://github.com/QwenAudio/qwen-audio-agent/releases/tag/v1.9.0)**
30
+ 🧩 Desktop task cards show live Agent progress; 🔎 backend Agent selection is clearer and searchable; 🎙️ supports Qwen3.5-Omni Realtime frontend integration.
29
31
  - **2026-08-12 · [v1.8.3](https://github.com/QwenAudio/qwen-audio-agent/releases/tag/v1.8.3)**
30
32
  ✨ Refined prompts; 📉 reduced token usage; 🔧 fixed known issues.
31
33
  - **2026-08-11 · [v1.8.2](https://github.com/QwenAudio/qwen-audio-agent/releases/tag/v1.8.2)**
@@ -134,7 +136,7 @@ qwenaudio config
134
136
 
135
137
  ```dotenv
136
138
  DASHSCOPE_API_KEY=your-key
137
- # Voice frontend model: qwen-audio-3.0-realtime-flash or qwen-audio-3.0-realtime-plus (default)
139
+ # Voice frontend model: Omni Flash/Plus or Audio Flash/Plus (Plus is default)
138
140
  QWEN_AUDIO_REALTIME_MODEL=qwen-audio-3.0-realtime-plus
139
141
  # Backend Agent: optional, leave empty or set to none for frontend-only mode
140
142
  AGENT_PROTOCOL=openclaw
@@ -143,6 +145,14 @@ QWEN_AUDIO_AGENT_BACKEND_MODEL=qwen3.7-max
143
145
  ```
144
146
 
145
147
  > Uses DashScope realtime voice frontend by default; alternatively, switch to a local [speech-to-speech frontend](docs/voice-frontends/speech-to-speech.md), no cloud API Key needed.
148
+ > `qwen3.5-omni-flash-realtime` and `qwen3.5-omni-plus-realtime`
149
+ > accept text, audio, and image at the model level. This release transports text and
150
+ > audio only; image/frame and native-video transport remain disabled until their client and
151
+ > Gateway paths are implemented.
152
+
153
+ The Desktop app or `qwenaudio config set --realtime-model <id>` configures the single
154
+ Gateway-wide model. Restart the Gateway after a CLI change. WebUI and TUI display the active
155
+ model but do not override it.
146
156
 
147
157
  2. Start the Gateway, then open another terminal to start the TUI (or use `qwenaudio webui` for the browser UI):
148
158
 
package/README_ZH.md CHANGED
@@ -20,6 +20,8 @@
20
20
 
21
21
  ## News
22
22
 
23
+ - **2026-08-13 · [v1.9.0](https://github.com/QwenAudio/qwen-audio-agent/releases/tag/v1.9.0)**
24
+ 🧩 桌面任务卡实时展示 Agent 进度;🔎 后台 Agent 选择更清晰、支持搜索;🎙️ 支持 Qwen3.5-Omni Realtime 前台模型接入。
23
25
  - **2026-08-12 · [v1.8.3](https://github.com/QwenAudio/qwen-audio-agent/releases/tag/v1.8.3)**
24
26
  ✨ 优化 Prompt;📉 减少 Token 消耗;🔧 修复已知问题。
25
27
  - **2026-08-11 · [v1.8.2](https://github.com/QwenAudio/qwen-audio-agent/releases/tag/v1.8.2)**
@@ -125,7 +127,7 @@ qwenaudio config
125
127
 
126
128
  ```dotenv
127
129
  DASHSCOPE_API_KEY=your-key
128
- # 语音前台模型:qwen-audio-3.0-realtime-flash 或 qwen-audio-3.0-realtime-plus(默认)
130
+ # 语音前台模型:Omni Flash/Plus 或 Audio Flash/Plus(Plus 默认)
129
131
  QWEN_AUDIO_REALTIME_MODEL=qwen-audio-3.0-realtime-plus
130
132
  # 后台Agent:可选,不设置或设置为 none 时,启动仅前台模式
131
133
  AGENT_PROTOCOL=openclaw
@@ -134,6 +136,12 @@ QWEN_AUDIO_AGENT_BACKEND_MODEL=qwen3.7-max
134
136
  ```
135
137
 
136
138
  > 默认使用 DashScope 实时语音前台;也可切换为本地 [speech-to-speech 前台](docs/voice-frontends/speech-to-speech.zh.md),无需云端 API Key。
139
+ > `qwen3.5-omni-flash-realtime` 与 `qwen3.5-omni-plus-realtime`
140
+ > 在模型层支持文本、音频和图片输入。本版本客户端传输层仅启用文本和音频;
141
+ > 图片/画面帧与原生视频传输仍保持关闭,待对应客户端和 Gateway 链路实现。
142
+
143
+ 桌面版或 `qwenaudio config set --realtime-model <id>` 配置 Gateway 统一使用的模型;
144
+ CLI 修改后需要重启 Gateway。WebUI 与 TUI 只显示当前生效模型,不单独覆盖模型。
137
145
 
138
146
  2. 启动 Gateway,另开终端启动 TUI(也可用 `qwenaudio webui` 启动浏览器界面):
139
147
 
package/cli/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@qwen-audio-agent/cli",
3
3
  "private": true,
4
- "version": "1.8.3",
4
+ "version": "1.9.0",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "qwenaudio": "./bin/qwenaudio.mjs"
@@ -54,6 +54,11 @@ export function parseArguments(argv, env = process.env) {
54
54
  const first = args[0]
55
55
  const command = first && !first.startsWith('-') ? args.shift() : 'gateway'
56
56
  if (!COMMANDS.has(command)) throw new Error(`未知命令:${command}`)
57
+ const configAction = command === 'config' && args[0] && !args[0].startsWith('-')
58
+ ? args.shift() : ''
59
+ if (command === 'config' && configAction && !['show', 'set'].includes(configAction)) {
60
+ throw new Error(`未知 config 命令:${configAction}`)
61
+ }
57
62
  const gatewayAction = command === 'gateway'
58
63
  && args[0]
59
64
  && !args[0].startsWith('-')
@@ -70,6 +75,8 @@ export function parseArguments(argv, env = process.env) {
70
75
 
71
76
  const options = {
72
77
  command,
78
+ configAction,
79
+ realtimeModel: '',
73
80
  gatewayAction,
74
81
  url: env.QWEN_AUDIO_AGENT_URL || 'http://127.0.0.1:3101',
75
82
  sessionId: env.QWEN_AUDIO_AGENT_SESSION_ID || createVoiceSessionId(),
@@ -120,6 +127,8 @@ export function parseArguments(argv, env = process.env) {
120
127
  options.backendUrl = nextValue(args, index++, '--backend-url')
121
128
  options.backendUrlSpecified = true
122
129
  options.gatewayConfigurationSpecified = true
130
+ } else if (argument === '--realtime-model') {
131
+ options.realtimeModel = nextValue(args, index++, '--realtime-model')
123
132
  } else if (argument === '--session') {
124
133
  options.sessionId = nextValue(args, index++, '--session')
125
134
  } else if (argument === '--audio-mode') {
@@ -133,6 +142,13 @@ export function parseArguments(argv, env = process.env) {
133
142
  else throw new Error(`未知参数:${argument}`)
134
143
  }
135
144
 
145
+ if ((command !== 'config' || configAction !== 'set') && options.realtimeModel) {
146
+ throw new Error('--realtime-model 只适用于 config set')
147
+ }
148
+ if (command === 'config' && configAction === 'set' && !options.realtimeModel) {
149
+ throw new Error('config set 需要 --realtime-model')
150
+ }
151
+
136
152
  if (
137
153
  command === 'install'
138
154
  && !normalizeBackendProtocol(installTarget)
@@ -239,6 +255,8 @@ export function helpText() {
239
255
  ' qwenaudio webui [选项] 打开现有 Gateway 的 WebUI',
240
256
  ' qwenaudio status [选项] gateway status 的兼容别名',
241
257
  ' qwenaudio config 显示用户配置文件位置',
258
+ ' qwenaudio config show 显示有效 Realtime 模型(不含凭据)',
259
+ ' qwenaudio config set --realtime-model ID 更新 Realtime 模型',
242
260
  ' qwenaudio setup [选项] 只读检查后台 Agent 接入准备情况',
243
261
  ' qwenaudio install NAME 一键安装后台 Agent(含所需 ACP 适配器)',
244
262
  '',
@@ -0,0 +1,91 @@
1
+ import { closeSync, fsyncSync, mkdirSync, openSync, renameSync, chmodSync, readFileSync, writeSync } from 'node:fs'
2
+ import { dirname, resolve } from 'node:path'
3
+ import { randomUUID } from 'node:crypto'
4
+ import {
5
+ DEFAULT_DASHSCOPE_REALTIME_MODEL,
6
+ listDashScopeRealtimeModelProfiles,
7
+ resolveDashScopeRealtimeModelProfile,
8
+ } from '../../shared/realtime-provider-catalog.mjs'
9
+
10
+ export const GATEWAY_RESTART_FOLLOW_UP = '配置已更新;请执行 qwenaudio gateway restart 使 Gateway 使用新模型'
11
+
12
+ function configText(path) {
13
+ try { return readFileSync(path, 'utf8') } catch (error) {
14
+ if (error.code === 'ENOENT') return ''
15
+ throw error
16
+ }
17
+ }
18
+
19
+ export function resolveConfigModel(env = {}, content = '') {
20
+ const match = content.match(/^\s*QWEN_AUDIO_REALTIME_MODEL\s*=\s*(.*?)\s*$/m)
21
+ return String(env.QWEN_AUDIO_REALTIME_MODEL || match?.[1] || DEFAULT_DASHSCOPE_REALTIME_MODEL).trim()
22
+ }
23
+
24
+ export function assertKnownRealtimeModel(model) {
25
+ const profile = resolveDashScopeRealtimeModelProfile(model)
26
+ if (!listDashScopeRealtimeModelProfiles().some(item => item.id === model)) {
27
+ throw new Error(`不支持的 Realtime 模型:${model}`)
28
+ }
29
+ return profile
30
+ }
31
+
32
+ export function updateRealtimeModelConfig(configPath, model, {
33
+ fsyncDirectory = true,
34
+ } = {}) {
35
+ assertKnownRealtimeModel(model)
36
+ const existing = configText(configPath)
37
+ const assignments = new Map([
38
+ ['QWEN_AUDIO_REALTIME_MODEL', model],
39
+ ])
40
+ const newline = existing.includes('\r\n') ? '\r\n' : '\n'
41
+ const lines = existing ? existing.split(/\r?\n/) : []
42
+ if (lines.at(-1) === '') lines.pop()
43
+ const replaced = new Set()
44
+ const normalized = []
45
+ for (const current of lines) {
46
+ const match = current.match(/^\s*(QWEN_AUDIO_REALTIME_MODEL)\s*=.*$/)
47
+ const key = match?.[1]
48
+ if (!key) {
49
+ normalized.push(current)
50
+ continue
51
+ }
52
+ if (!replaced.has(key)) normalized.push(`${key}=${assignments.get(key)}`)
53
+ replaced.add(key)
54
+ }
55
+ for (const [key, value] of assignments) {
56
+ if (!replaced.has(key)) normalized.push(`${key}=${value}`)
57
+ }
58
+ const updated = `${normalized.join(newline)}${newline}`
59
+ const directory = dirname(configPath)
60
+ mkdirSync(directory, { recursive: true, mode: 0o700 })
61
+ const tempPath = resolve(directory, `.config.env.${process.pid}.${randomUUID()}.tmp`)
62
+ const fd = openSync(tempPath, 'wx', 0o600)
63
+ try {
64
+ chmodSync(tempPath, 0o600)
65
+ writeSync(fd, updated, 0, 'utf8')
66
+ fsyncSync(fd)
67
+ } finally {
68
+ closeSync(fd)
69
+ }
70
+ renameSync(tempPath, configPath)
71
+ if (fsyncDirectory) {
72
+ try {
73
+ const directoryFd = openSync(directory, 'r')
74
+ try { fsyncSync(directoryFd) } finally { closeSync(directoryFd) }
75
+ } catch {}
76
+ }
77
+ return {
78
+ model,
79
+ profile: resolveDashScopeRealtimeModelProfile(model),
80
+ configPath,
81
+ }
82
+ }
83
+
84
+ export function showConfig({ configPath, env = {}, content = configText(configPath) }) {
85
+ const model = resolveConfigModel(env, content)
86
+ return [
87
+ `Realtime 模型:${model}`,
88
+ '可用 Realtime 模型:',
89
+ ...listDashScopeRealtimeModelProfiles().map(profile => `- ${profile.id}(${profile.label})`),
90
+ ].join('\n')
91
+ }
@@ -21,6 +21,11 @@ import {
21
21
  import { launchWebUi } from './webui.mjs'
22
22
  import { acquireCliInstance } from './instance-lock.mjs'
23
23
  import { manageGatewayService } from './gateway-service.mjs'
24
+ import {
25
+ GATEWAY_RESTART_FOLLOW_UP,
26
+ showConfig,
27
+ updateRealtimeModelConfig,
28
+ } from './config-command.mjs'
24
29
 
25
30
  const root = resolve(dirname(fileURLToPath(import.meta.url)), '../..')
26
31
  const gatewayPath = resolve(root, 'server/src/index.mjs')
@@ -71,13 +76,19 @@ function applyGatewayOptions(env, options) {
71
76
  }
72
77
 
73
78
  function gatewaySummary(health) {
74
- if (health?.backend?.enabled === false) return '仅前台聊天模式'
79
+ const model = health?.realtimeModelProfile?.label
80
+ || health?.realtimeLabel
81
+ || health?.realtimeModel
82
+ const modelSummary = model ? `Realtime:${model}` : ''
83
+ if (health?.backend?.enabled === false) {
84
+ return [modelSummary, '仅前台聊天模式'].filter(Boolean).join(' · ')
85
+ }
75
86
  const label = health?.backend?.label
76
87
  || health?.backend?.kind
77
88
  || health?.backend?.protocol
78
89
  || '后台 Agent'
79
90
  const state = health?.backend?.ok ? '已连接' : '未连接'
80
- return `${label} ${state}`
91
+ return [modelSummary, `${label} ${state}`].filter(Boolean).join(' · ')
81
92
  }
82
93
 
83
94
  function gatewayServiceEnvironment(url) {
@@ -141,8 +152,13 @@ export async function main(argv, {
141
152
  waitForServiceStop = url => waitForGatewayStop(url, { inspectGateway }),
142
153
  runWebUi = options => launchWebUi(options),
143
154
  acquireInstance = directory => acquireCliInstance(directory),
155
+ updateConfig = updateRealtimeModelConfig,
144
156
  } = {}) {
157
+ const processRealtimeModelOverride = String(
158
+ env.QWEN_AUDIO_REALTIME_MODEL || '',
159
+ ).trim()
145
160
  const readOnlyCommand = ['setup', 'install'].includes(argv[0])
161
+ || (argv[0] === 'config' && argv[1] === 'show')
146
162
  const environment = prepareEnvironment({ readOnly: readOnlyCommand })
147
163
  const options = parseArguments(argv, env)
148
164
  if (options.help) {
@@ -150,8 +166,26 @@ export async function main(argv, {
150
166
  return 0
151
167
  }
152
168
  if (options.command === 'config') {
153
- stdout.write(`${environment.configPath
154
- || resolve(environment.configDirectory, 'config.env')}\n`)
169
+ const configPath = environment.configPath
170
+ || resolve(environment.configDirectory, 'config.env')
171
+ if (!options.configAction) {
172
+ stdout.write(`${configPath}\n`)
173
+ } else if (options.configAction === 'show') {
174
+ stdout.write(`${showConfig({ configPath, env })}\n`)
175
+ } else {
176
+ updateConfig(configPath, options.realtimeModel)
177
+ if (
178
+ processRealtimeModelOverride
179
+ && processRealtimeModelOverride !== options.realtimeModel
180
+ ) {
181
+ stdout.write(
182
+ '配置文件已更新;当前 QWEN_AUDIO_REALTIME_MODEL 环境变量仍覆盖该值。'
183
+ + '请先取消环境变量,再执行 qwenaudio gateway restart\n',
184
+ )
185
+ } else {
186
+ stdout.write(`${GATEWAY_RESTART_FOLLOW_UP}\n`)
187
+ }
188
+ }
155
189
  return 0
156
190
  }
157
191
  if (options.command === 'setup') {
@@ -159,6 +159,11 @@ export function assertGatewayCompatibility(health, backend) {
159
159
 
160
160
  export function assertRealtimeGatewayCompatibility(health, env = process.env) {
161
161
  const expected = resolveRealtimeFrontendConfiguration(env)
162
+ const requestedModel = String(env.QWEN_AUDIO_REALTIME_MODEL || '').trim()
163
+ const actualModel = String(health?.realtimeModelProfile?.id || health?.realtimeModel || '').trim()
164
+ if (requestedModel && actualModel && requestedModel !== actualModel) {
165
+ throw new Error(`现有 Gateway Realtime 模型 ${actualModel} 与请求 ${requestedModel} 不一致;请关闭旧 Gateway 后重试`)
166
+ }
162
167
  if (!String(health?.realtimeProvider || '').trim()) {
163
168
  throw new Error(
164
169
  '现有 Gateway 未报告完整的 Realtime 前台配置,无法安全复用',
@@ -369,11 +369,14 @@ stdio, and that adapter starts Codex App Server over its own local stdio
369
369
  protocol. Codex App Server may expose other transports, but they are not a
370
370
  remote ACP endpoint and must not leak into the shared ACP adapter.
371
371
 
372
- Desktop, TUI and WebUI are replaceable Gateway clients. They must never spawn,
373
- restart or stop the Gateway or a backend. Closing a UI therefore cannot affect
374
- queued work or the fixed backend Agent Session. Configuration that changes
375
- Realtime or backend behavior takes effect on the next Gateway start; changing a
376
- UI's Gateway URL only reconnects that UI.
372
+ Desktop, TUI and WebUI are replaceable Gateway clients. The Gateway is the single
373
+ owner of its active Realtime model and publishes the exact model profile and
374
+ transport capabilities through health. Desktop may configure and restart only
375
+ its locally owned Gateway; WebUI and TUI treat the profile as read-only. Borrowed
376
+ or remote Gateway model mismatches are rejected rather than silently overridden.
377
+ Closing a UI cannot affect queued work or the fixed backend Agent Session.
378
+ Configuration that changes Realtime or backend behavior takes effect on the next
379
+ Gateway start; changing a UI's Gateway URL only reconnects that UI.
377
380
 
378
381
  The macOS desktop renderer is packaged inside the application. Electron serves
379
382
  those immutable assets from a private, random loopback path and proxies only
@@ -299,10 +299,12 @@ Codex 也遵循同一边界:qwen-audio-agent 通过 ACP stdio 启动 `codex-ac
299
299
  通过自己的本地 stdio 协议启动 Codex App Server。Codex App Server 可以提供其他传输,
300
300
  但它们不是远程 ACP 端点,不应泄漏进共享 ACP 适配层。
301
301
 
302
- Desktop、TUI 和 WebUI 是可替换的 Gateway 客户端。它们绝不能生成、重启或停止
303
- Gateway 或后端。因此,关闭 UI 不会影响排队中的工作或固定的后端 Agent Session。
304
- 更改实时或后端行为的配置在下次 Gateway 启动时生效;更改 UI 的 Gateway URL
305
- 仅重新连接该 UI。
302
+ Desktop、TUI 和 WebUI 是可替换的 Gateway 客户端。Gateway 是当前 Realtime 模型的
303
+ 唯一所有者,并通过 health 发布精确模型档案与传输能力。Desktop 只能配置和重启其
304
+ 本地自有 Gateway;WebUI 与 TUI 将档案视为只读。借用或远程 Gateway 的模型不一致
305
+ 会被拒绝,而不会被静默覆盖。关闭 UI 不会影响排队中的工作或固定的后端 Agent
306
+ Session。更改实时或后端行为的配置在下次 Gateway 启动时生效;更改 UI 的 Gateway
307
+ URL 仅重新连接该 UI。
306
308
 
307
309
  macOS 桌面渲染器打包在应用程序内部。Electron 从私有的随机回环路径提供这些
308
310
  不可变资源,并仅代理 Gateway HTTP API 和 Realtime WebSocket 流量。桌面 UI
@@ -659,6 +659,34 @@ You can also specify a different OpenCode user configuration directory via
659
659
  `QWEN_AUDIO_AGENT_OPENCODE_XDG_CONFIG_HOME`. After isolation, MCPs and plugins from the
660
660
  original global configuration are not automatically loaded.
661
661
 
662
+ ## Realtime model selection
663
+
664
+ One Gateway owns one active Realtime model. The Desktop settings page can configure the model
665
+ for a locally owned Gateway, and the CLI provides the equivalent commands:
666
+
667
+ ```bash
668
+ qwenaudio config show
669
+ qwenaudio config set --realtime-model qwen3.5-omni-flash-realtime
670
+ qwenaudio gateway restart
671
+ ```
672
+
673
+ The exact supported IDs are:
674
+
675
+ | Model | Model input | Model output | Current client transport |
676
+ | --- | --- | --- | --- |
677
+ | `qwen3.5-omni-flash-realtime` | text, audio, image | text, audio | text, audio |
678
+ | `qwen3.5-omni-plus-realtime` | text, audio, image | text, audio | text, audio |
679
+ | `qwen-audio-3.0-realtime-plus` (default) | text, audio | text, audio | text, audio |
680
+ | `qwen-audio-3.0-realtime-flash` | text, audio | text, audio | text, audio |
681
+
682
+ All four profiles support Function Calling. Model capability is not the same as an implemented
683
+ client transport: JPEG observation frames and native video are both disabled in this release.
684
+ WebUI and TUI read the authoritative profile from Gateway health and only display it. Separate
685
+ clients cannot select conflicting models on one Gateway. A Desktop attached to a borrowed
686
+ Gateway, or a later CLI runtime using a conflicting configured model, refuses the mismatch
687
+ instead of silently changing the running service. To roll back, set the legacy ID above and
688
+ restart the Gateway.
689
+
662
690
  ## Advanced Settings
663
691
 
664
692
  The following settings all have stable default values; ordinary users do not need to write
@@ -674,7 +702,8 @@ them to the configuration file:
674
702
  | `QWEN_AUDIO_AGENT_BACKEND_PERMISSION_MODE` | `native` |
675
703
  | `QWEN_AUDIO_REALTIME_MODEL` | `qwen-audio-3.0-realtime-plus` |
676
704
  | `QWEN_AUDIO_REALTIME_PROVIDER` | `dashscope` |
677
- | `QWEN_AUDIO_REALTIME_VOICE` | `longanqian` |
705
+ | `QWEN_AUDIO_REALTIME_VOICE` | Empty; optional Audio-family override, otherwise runtime uses `longanqian` |
706
+ | `QWEN_OMNI_REALTIME_VOICE` | Empty; optional Omni-family override, otherwise runtime uses `Ethan` |
678
707
  | `SPEECH_TO_SPEECH_REALTIME_URL` | `ws://127.0.0.1:8765/v1/realtime` |
679
708
  | `SPEECH_TO_SPEECH_AUTH_TOKEN` | Empty; only for proxies with Bearer authentication |
680
709
  | `QWEN_AUDIO_AGENT_IDENTITY_MODE` | `personal` |
@@ -588,6 +588,32 @@ QWEN_AUDIO_AGENT_OPENCODE_ISOLATE_USER_CONFIG=true
588
588
  也可以通过 `QWEN_AUDIO_AGENT_OPENCODE_XDG_CONFIG_HOME` 指定另一套 OpenCode 用户
589
589
  配置目录。隔离后,原全局配置中的 MCP 和插件不会自动加载。
590
590
 
591
+ ## Realtime 模型选择
592
+
593
+ 一个 Gateway 只拥有一个当前生效的 Realtime 模型。桌面设置页可以配置本地自有
594
+ Gateway 的模型,CLI 提供等价命令:
595
+
596
+ ```bash
597
+ qwenaudio config show
598
+ qwenaudio config set --realtime-model qwen3.5-omni-flash-realtime
599
+ qwenaudio gateway restart
600
+ ```
601
+
602
+ 精确支持的模型 ID 如下:
603
+
604
+ | 模型 | 模型输入 | 模型输出 | 当前客户端传输 |
605
+ | --- | --- | --- | --- |
606
+ | `qwen3.5-omni-flash-realtime` | 文本、音频、图片 | 文本、音频 | 文本、音频 |
607
+ | `qwen3.5-omni-plus-realtime` | 文本、音频、图片 | 文本、音频 | 文本、音频 |
608
+ | `qwen-audio-3.0-realtime-plus`(默认) | 文本、音频 | 文本、音频 | 文本、音频 |
609
+ | `qwen-audio-3.0-realtime-flash` | 文本、音频 | 文本、音频 | 文本、音频 |
610
+
611
+ 四个档案都支持 Function Calling。模型能力不等于客户端已经实现的传输能力:本版本
612
+ 仍关闭 JPEG 观察帧和原生视频传输。WebUI 与 TUI 从 Gateway health 读取权威档案并
613
+ 只读展示;同一 Gateway 上的不同客户端不能选择互相冲突的模型。桌面版附着到借用的
614
+ Gateway 时,或后续 CLI 运行时使用了冲突的已配置模型时,会拒绝不一致,而不会静默
615
+ 修改运行中服务。回滚时设置上表的旧版模型 ID 并重启 Gateway。
616
+
591
617
  ## 高级设置
592
618
 
593
619
  以下设置都有稳定默认值,普通用户不需要写入配置文件:
@@ -602,7 +628,8 @@ QWEN_AUDIO_AGENT_OPENCODE_ISOLATE_USER_CONFIG=true
602
628
  | `QWEN_AUDIO_AGENT_BACKEND_PERMISSION_MODE` | `native` |
603
629
  | `QWEN_AUDIO_REALTIME_MODEL` | `qwen-audio-3.0-realtime-plus` |
604
630
  | `QWEN_AUDIO_REALTIME_PROVIDER` | `dashscope` |
605
- | `QWEN_AUDIO_REALTIME_VOICE` | `longanqian` |
631
+ | `QWEN_AUDIO_REALTIME_VOICE` | 空;Audio 模型族的可选覆盖,未设置时运行时使用 `longanqian` |
632
+ | `QWEN_OMNI_REALTIME_VOICE` | 空;Omni 模型族的可选覆盖,未设置时运行时使用 `Ethan` |
606
633
  | `SPEECH_TO_SPEECH_REALTIME_URL` | `ws://127.0.0.1:8765/v1/realtime` |
607
634
  | `SPEECH_TO_SPEECH_AUTH_TOKEN` | 空;仅用于带 Bearer 认证的代理 |
608
635
  | `QWEN_AUDIO_AGENT_IDENTITY_MODE` | `personal` |
@@ -2,6 +2,14 @@
2
2
 
3
3
  The desktop app provides a persistent on-screen voice orb and includes a built-in Gateway, eliminating the need to start a service beforehand. If a local Gateway already exists in the same user configuration directory, it will connect directly and use the Gateway's current runtime configuration; otherwise, the desktop app will start and manage it automatically. On first run, the app creates a configuration file and guides you to fill in the DashScope API Key on the settings page and select a backend agent (frontend-only mode is also available).
4
4
 
5
+ ## Backend Agent Connection
6
+
7
+ The app manages the selected backend Agent by default. For Agents that expose
8
+ an external-service capability, the Backend Agent settings also allow connecting
9
+ to an existing service by address and optional access token. OpenClaw currently
10
+ supports this mode; Agents without that capability continue to use their managed
11
+ ACP process and do not show irrelevant connection fields.
12
+
5
13
  ## Orb and Auto Sleep
6
14
 
7
15
  When idle, the orb automatically hides and disconnects real-time voice; you can also say "可以退下了" (you may step down) to hide it. The app remains in the menu bar and can be re-summoned from the menu bar or via a show shortcut. The default shortcut is `⇧⌘ Space` and can be changed in app settings.
@@ -5,6 +5,12 @@
5
5
  应用会创建配置文件,并引导你在设置页填写 DashScope API Key、选择后台 Agent
6
6
  (也可以使用仅前台模式)。
7
7
 
8
+ ## 后台 Agent 连接
9
+
10
+ 桌面版默认管理所选后台 Agent。对于声明支持外部服务的 Agent,设置页还可以选择
11
+ “连接现有服务”,填写服务地址和可选的访问令牌;目前 OpenClaw 支持此模式。
12
+ 不具备该能力的 Agent 继续使用托管 ACP 进程,也不会显示无效的连接字段。
13
+
8
14
  ## 悬浮球与自动休眠
9
15
 
10
16
  闲置后悬浮球会自动隐藏并断开实时语音;也可以直接说“可以退下了”让它隐藏。应用仍
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "qwen-audio-agent",
3
3
  "desktopName": "qwen-audio-agent.desktop",
4
- "version": "1.8.3",
4
+ "version": "1.9.0",
5
5
  "description": "A realtime voice frontend for mainstream AI agents.",
6
6
  "author": "qwen-audio-agent contributors",
7
7
  "license": "Apache-2.0",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@qwen-audio-agent/server",
3
3
  "private": true,
4
- "version": "1.8.3",
4
+ "version": "1.9.0",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "node --watch src/index.mjs",
@@ -89,6 +89,20 @@ function categoryForTool(update) {
89
89
  }
90
90
 
91
91
  export function activityFromUpdate(update, known = new Map()) {
92
+ if (update?.sessionUpdate === 'plan') {
93
+ const entries = Array.isArray(update.entries) ? update.entries : []
94
+ const completed = entries.filter(entry => entry?.status === 'completed').length
95
+ const current = entries.find(entry => entry?.status === 'in_progress')
96
+ || entries.find(entry => entry?.status === 'pending')
97
+ return {
98
+ id: 'acp-plan',
99
+ kind: 'plan',
100
+ status: current ? 'running' : 'completed',
101
+ detail: bounded(current?.content || ''),
102
+ completed,
103
+ total: entries.length,
104
+ }
105
+ }
92
106
  if (!['tool_call', 'tool_call_update'].includes(update?.sessionUpdate)) {
93
107
  if (update?.sessionUpdate === 'agent_message_chunk') {
94
108
  return { id: null, kind: 'text', status: 'running' }
@@ -104,6 +118,12 @@ export function activityFromUpdate(update, known = new Map()) {
104
118
  id: id || null,
105
119
  kind: 'tool',
106
120
  tool: bounded(merged.name || merged.title, 100) || 'tool',
121
+ label: bounded(
122
+ merged.rawInput?.description
123
+ || merged.title
124
+ || '',
125
+ 160,
126
+ ),
107
127
  status: merged.status || 'running',
108
128
  category: categoryForTool(merged),
109
129
  detail: bounded(
@@ -212,6 +212,8 @@ app.get('/api/health', async (req, res) => {
212
212
  realtimeProvider: realtime.provider,
213
213
  realtimeLabel: realtime.label,
214
214
  realtimeModel: realtime.model,
215
+ realtimeModelProfile: realtime.modelProfile,
216
+ realtimeModelCatalog: realtime.modelCatalog,
215
217
  realtimeInputSampleRate: realtime.inputSampleRate,
216
218
  realtimeConfigurationSignature: realtime.configurationSignature,
217
219
  // Front ends a client may select for its session through the realtime
@@ -1,4 +1,7 @@
1
1
  import { config, realtimeUrl } from '../../core/config.mjs'
2
+ import {
3
+ resolveDashScopeRealtimeModelProfile,
4
+ } from '../../../../shared/realtime-provider-catalog.mjs'
2
5
  import {
3
6
  buildFrontendInstructions,
4
7
  frontendTools,
@@ -24,6 +27,18 @@ function classifyError(message) {
24
27
  return 'other'
25
28
  }
26
29
 
30
+ function activeModelProfile() {
31
+ return resolveDashScopeRealtimeModelProfile(config.audioModel)
32
+ }
33
+
34
+ function responseModalities(profile, { textOnly = false } = {}) {
35
+ const capabilities = profile.modelCapabilities
36
+ return [
37
+ capabilities.textOutput ? 'text' : null,
38
+ !textOnly && capabilities.audioOutput ? 'audio' : null,
39
+ ].filter(Boolean)
40
+ }
41
+
27
42
  export const dashscopeProvider = {
28
43
  key: 'dashscope',
29
44
  label: 'Qwen-Audio-Realtime',
@@ -31,12 +46,16 @@ export const dashscopeProvider = {
31
46
  outputSampleRate: 24000,
32
47
  protocol: openAiCompatibleProtocol,
33
48
 
34
- capabilities: {
35
- perResponseInstructions: true,
49
+ get capabilities() {
50
+ return {
51
+ perResponseInstructions: true,
52
+ conversationItemIdEcho: activeModelProfile().family !== 'omni',
53
+ }
36
54
  },
37
55
 
38
56
  model: () => config.audioModel,
39
- voice: () => config.audioVoice,
57
+ modelProfile: activeModelProfile,
58
+ voice: () => config.audioVoice || activeModelProfile().sessionDefaults.voice,
40
59
  isConfigured: () => Boolean(config.dashscopeApiKey),
41
60
  missingConfigurationMessage: '请先配置 DASHSCOPE_API_KEY',
42
61
  connectTimeoutMessage: '连接 Qwen Audio Realtime 超时',
@@ -47,23 +66,32 @@ export const dashscopeProvider = {
47
66
 
48
67
  buildSession: ({ configured, agentContext }) => {
49
68
  const textOnly = agentContext?.textOnly === true
69
+ const profile = activeModelProfile()
50
70
  const session = {
51
71
  instructions: buildFrontendInstructions(agentContext),
52
- tools: frontendTools(agentContext),
72
+ }
73
+ if (profile.modelCapabilities.functionCalling) {
74
+ session.tools = frontendTools(agentContext)
53
75
  }
54
76
  if (!configured) {
55
- session.modalities = textOnly ? ['text'] : ['text', 'audio']
56
- session.voice = config.audioVoice
57
- session.input_audio_format = 'pcm'
58
- session.output_audio_format = 'pcm'
59
- session.turn_detection = textOnly ? null : { type: 'smart_turn' }
77
+ session.modalities = responseModalities(profile, { textOnly })
78
+ if (profile.modelCapabilities.audioOutput) {
79
+ session.voice = dashscopeProvider.voice()
80
+ session.output_audio_format = 'pcm'
81
+ }
82
+ if (profile.transportCapabilities.audioInput) {
83
+ session.input_audio_format = 'pcm'
84
+ }
85
+ session.turn_detection = !textOnly && profile.transportCapabilities.audioInput
86
+ ? profile.sessionDefaults.turnDetection
87
+ : null
60
88
  }
61
89
  return session
62
90
  },
63
91
 
64
92
  buildSpeakResponse: (content, { textOnly = false } = {}) => ({
65
93
  conversation: 'none',
66
- modalities: textOnly ? ['text'] : ['text', 'audio'],
94
+ modalities: responseModalities(activeModelProfile(), { textOnly }),
67
95
  instructions: speakResponseInstructions(content),
68
96
  }),
69
97
 
@@ -74,7 +102,7 @@ export const dashscopeProvider = {
74
102
  content: [{ type: 'input_text', text: content }],
75
103
  },
76
104
  response: {
77
- modalities: textOnly ? ['text'] : ['text', 'audio'],
105
+ modalities: responseModalities(activeModelProfile(), { textOnly }),
78
106
  tool_choice: 'none',
79
107
  instructions: resultResponseInstructions,
80
108
  },
@@ -95,7 +123,7 @@ export const dashscopeProvider = {
95
123
  }],
96
124
  },
97
125
  response: {
98
- modalities: textOnly ? ['text'] : ['text', 'audio'],
126
+ modalities: responseModalities(activeModelProfile(), { textOnly }),
99
127
  tool_choice: 'none',
100
128
  instructions: permissionResponseInstructions,
101
129
  },