agent-mp 0.4.13 → 0.4.14

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.
@@ -259,7 +259,7 @@ async function callQwenAPIWithToken(token, prompt, model, onData) {
259
259
  const baseUrl = host.endsWith('/v1') ? host : `${host}/v1`;
260
260
  const useStream = !!onData;
261
261
  const userAgent = `QwenCode/0.14.2 (${process.platform}; ${process.arch})`;
262
- // portal.qwen.ai requires content parts format (plain strings return 400)
262
+ // portal.qwen.ai requires: content parts format + system message (plain strings 400, no system → 400)
263
263
  const toContentParts = (text) => [{ type: 'text', text }];
264
264
  const response = await fetch(`${baseUrl}/chat/completions`, {
265
265
  method: 'POST',
@@ -281,7 +281,10 @@ async function callQwenAPIWithToken(token, prompt, model, onData) {
281
281
  },
282
282
  body: JSON.stringify({
283
283
  model: model || 'coder-model',
284
- messages: [{ role: 'user', content: toContentParts(prompt) }],
284
+ messages: [
285
+ { role: 'system', content: toContentParts('You are a helpful coding assistant.') },
286
+ { role: 'user', content: toContentParts(prompt) },
287
+ ],
285
288
  stream: useStream,
286
289
  }),
287
290
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-mp",
3
- "version": "0.4.13",
3
+ "version": "0.4.14",
4
4
  "description": "Deterministic multi-agent CLI orchestrator — plan, code, review",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",