@mupt-ai/dari-gateway 1.0.307 → 1.0.309

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.
@@ -76,8 +76,8 @@ function appendAnthropicMessage(items, role, value, messageIndex) {
76
76
  });
77
77
  return;
78
78
  }
79
- if (!Array.isArray(value) || value.length === 0) {
80
- throw invalidRequest(`messages[${messageIndex}].content must be a string or a non-empty array.`, `messages.${messageIndex}.content`);
79
+ if (!Array.isArray(value)) {
80
+ throw invalidRequest(`messages[${messageIndex}].content must be a string or an array.`, `messages.${messageIndex}.content`);
81
81
  }
82
82
  let buffered = [];
83
83
  const flushMessage = () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mupt-ai/dari-gateway",
3
- "version": "1.0.307",
3
+ "version": "1.0.309",
4
4
  "description": "Self-hostable LLM gateway for coding agents and APIs: one endpoint for Anthropic Messages, OpenAI Chat Completions, and OpenAI Responses, with subscription pooling, failover, and prompt-cache-aware routing.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -51,7 +51,7 @@
51
51
  },
52
52
  "dependencies": {
53
53
  "@aws-sdk/client-sts": "3.1063.0",
54
- "@mupt-ai/dari-router": "1.0.307",
54
+ "@mupt-ai/dari-router": "1.0.309",
55
55
  "@mupt-ai/pi-ai": "1.5.2-mupt.1"
56
56
  },
57
57
  "devDependencies": {
@@ -106,9 +106,9 @@ function appendAnthropicMessage(
106
106
  });
107
107
  return;
108
108
  }
109
- if (!Array.isArray(value) || value.length === 0) {
109
+ if (!Array.isArray(value)) {
110
110
  throw invalidRequest(
111
- `messages[${messageIndex}].content must be a string or a non-empty array.`,
111
+ `messages[${messageIndex}].content must be a string or an array.`,
112
112
  `messages.${messageIndex}.content`
113
113
  );
114
114
  }