visual-ai-assertions 0.22.0 → 0.23.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 +5 -2
- package/dist/index.cjs +8 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# visual-ai-assertions
|
|
2
2
|
|
|
3
|
-
AI-powered visual assertions for E2E tests. Send screenshots — or short video recordings — to Claude, GPT, Gemini — or Grok, Kimi, and
|
|
3
|
+
AI-powered visual assertions for E2E tests. Send screenshots — or short video recordings — to Claude, GPT, Gemini — or Grok, Kimi, Qwen, and GLM via OpenRouter — and get structured, typed results.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -11,7 +11,7 @@ npm install visual-ai-assertions
|
|
|
11
11
|
# Optional: install additional provider SDKs
|
|
12
12
|
npm install @anthropic-ai/sdk # for Claude
|
|
13
13
|
npm install @google/genai # for Gemini
|
|
14
|
-
# OpenRouter (Grok, Kimi, Qwen, ...) uses the OpenAI SDK — no extra install
|
|
14
|
+
# OpenRouter (Grok, Kimi, Qwen, GLM, ...) uses the OpenAI SDK — no extra install
|
|
15
15
|
|
|
16
16
|
# Zod is a peer dependency
|
|
17
17
|
npm install zod
|
|
@@ -622,9 +622,12 @@ Any [OpenRouter](https://openrouter.ai/models) model slug (always `vendor/model`
|
|
|
622
622
|
| Qwen3.8 Max | `qwen/qwen3.8-max` | $2 | $6 | First Max tier with image input |
|
|
623
623
|
| Qwen3.7 Plus | `qwen/qwen3.7-plus` | $0.32 | $1.28 | Cost-effective, GUI/screen-reading |
|
|
624
624
|
| Qwen3.6 Flash | `qwen/qwen3.6-flash` | $0.19 | $1.13 | **Default** — cheap flash vision tier |
|
|
625
|
+
| GLM 5.3 Flash | `z-ai/glm-5.3-flash` | $0.15 | $0.50 | Z.ai flash tier, 1.3M context² |
|
|
625
626
|
|
|
626
627
|
¹ Muse Spark 1.3 is age-gated by OpenRouter: calls return HTTP 403 (`VisualAIAuthError`) until the account completes the 18+ confirmation at [openrouter.ai/settings/preferences](https://openrouter.ai/settings/preferences). It also reasons by default — expect several hundred reasoning tokens per call even with no `reasoningEffort` set.
|
|
627
628
|
|
|
629
|
+
² GLM 5.3 Flash reasons by default — expect one to two hundred reasoning tokens per call even with no `reasoningEffort` set, billed at the output rate. OpenRouter's own context cap for it is 1,048,576 tokens (Z.ai lists 1,310,720) and its output ceiling is 131,072.
|
|
630
|
+
|
|
628
631
|
Meta also publishes `meta/muse-spark-1.3-contributor`, the same model at $0.10 / $0.20 per MTok — about 12x cheaper — because Meta uses everything submitted through it for product improvement. It has **no named constant** (`Model.OpenRouter` does not expose it) and never appears by default anywhere in this library, so using it takes a deliberate, explicit choice: pass the slug directly as a plain string, `visualAI({ model: "meta/muse-spark-1.3-contributor" })`. Any OpenRouter slug works this way — see the note above the table — and cost tracking works correctly once you opt in. OpenRouter itself blocks it with HTTP 404 (`paid-model-training-violation-by-account`) until the account's privacy settings allow training endpoints, at [openrouter.ai/settings/privacy](https://openrouter.ai/settings/privacy). Only use it if sending your screenshots to Meta for training is a trade you've deliberately made.
|
|
629
632
|
|
|
630
633
|
`qwen/qwen3.7-max` and the DeepSeek V4 family (`deepseek/deepseek-v4-pro`, `deepseek/deepseek-v4-flash`, and dated variants such as `deepseek/deepseek-v4-pro-0813`) are not listed because they accept no image input on OpenRouter.
|
package/dist/index.cjs
CHANGED
|
@@ -135,7 +135,8 @@ var Model = {
|
|
|
135
135
|
KIMI_K2_7_CODE: "moonshotai/kimi-k2.7-code",
|
|
136
136
|
QWEN_3_8_MAX: "qwen/qwen3.8-max",
|
|
137
137
|
QWEN_3_7_PLUS: "qwen/qwen3.7-plus",
|
|
138
|
-
QWEN_3_6_FLASH: "qwen/qwen3.6-flash"
|
|
138
|
+
QWEN_3_6_FLASH: "qwen/qwen3.6-flash",
|
|
139
|
+
GLM_5_3_FLASH: "z-ai/glm-5.3-flash"
|
|
139
140
|
}
|
|
140
141
|
};
|
|
141
142
|
var DEFAULT_MODELS = {
|
|
@@ -1387,6 +1388,12 @@ var PRICING_TABLE = {
|
|
|
1387
1388
|
[`${Provider.OPENROUTER}:${Model.OpenRouter.QWEN_3_6_FLASH}`]: {
|
|
1388
1389
|
inputPricePerToken: 0.1875 / PER_MILLION,
|
|
1389
1390
|
outputPricePerToken: 1.125 / PER_MILLION
|
|
1391
|
+
},
|
|
1392
|
+
// Verified 2026-09-10 against https://openrouter.ai/api/v1/models. Cached
|
|
1393
|
+
// input is $0.03/MTok, not modelled (no provider gets a cache discount here).
|
|
1394
|
+
[`${Provider.OPENROUTER}:${Model.OpenRouter.GLM_5_3_FLASH}`]: {
|
|
1395
|
+
inputPricePerToken: 0.15 / PER_MILLION,
|
|
1396
|
+
outputPricePerToken: 0.5 / PER_MILLION
|
|
1390
1397
|
}
|
|
1391
1398
|
};
|
|
1392
1399
|
function calculateCost(provider, model, inputTokens, outputTokens) {
|