@qatonic_innovations/qaios 0.5.0 → 0.5.2
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/dist/index.js +14 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4300,6 +4300,8 @@ function tempForTier(tier) {
|
|
|
4300
4300
|
}
|
|
4301
4301
|
}
|
|
4302
4302
|
var DEFAULT_LLM_TIMEOUT_MS = 24e4;
|
|
4303
|
+
var DEFAULT_MAX_OUTPUT_TOKENS = 16384;
|
|
4304
|
+
var MAX_OUTPUT_TOKENS_CEILING = 21e3;
|
|
4303
4305
|
function llmTimeoutMs() {
|
|
4304
4306
|
const raw = process.env["QAIOS_LLM_TIMEOUT_MS"];
|
|
4305
4307
|
if (raw === void 0) return DEFAULT_LLM_TIMEOUT_MS;
|
|
@@ -4360,6 +4362,7 @@ var SkillRunner = class {
|
|
|
4360
4362
|
const maxAttempts = maxRetries + 1;
|
|
4361
4363
|
let attempt = 0;
|
|
4362
4364
|
let lastValidationError = null;
|
|
4365
|
+
let currentMaxTokens = DEFAULT_MAX_OUTPUT_TOKENS;
|
|
4363
4366
|
while (attempt < maxAttempts) {
|
|
4364
4367
|
attempt++;
|
|
4365
4368
|
const userPromptBase = skill.userPrompt(effectiveCtx, input);
|
|
@@ -4377,9 +4380,9 @@ var SkillRunner = class {
|
|
|
4377
4380
|
// but Sonnet 4.6 routinely hits stopReason=max_tokens at
|
|
4378
4381
|
// that limit — surfacing as a Zod validation error from
|
|
4379
4382
|
// truncated tool input. Sonnet supports up to 128k output;
|
|
4380
|
-
// 16k is
|
|
4381
|
-
//
|
|
4382
|
-
maxTokens:
|
|
4383
|
+
// 16k is the default headroom, escalated on truncation-retry
|
|
4384
|
+
// (see currentMaxTokens) for genuinely large suites.
|
|
4385
|
+
maxTokens: currentMaxTokens,
|
|
4383
4386
|
temperature: tempForTier(skill.modelTier)
|
|
4384
4387
|
};
|
|
4385
4388
|
const signal = buildCallSignal(ctx.cancelSignal);
|
|
@@ -4432,14 +4435,21 @@ var SkillRunner = class {
|
|
|
4432
4435
|
});
|
|
4433
4436
|
if (response.stopReason === "max_tokens") {
|
|
4434
4437
|
if (attempt < maxAttempts) {
|
|
4438
|
+
const escalated = Math.min(currentMaxTokens * 2, MAX_OUTPUT_TOKENS_CEILING);
|
|
4435
4439
|
ctx.auditLogger.append({
|
|
4436
4440
|
workflowId: ctx.workflowId,
|
|
4437
4441
|
phase: skill.phase,
|
|
4438
4442
|
skillId: skill.id,
|
|
4439
4443
|
event: "skill.retry",
|
|
4440
|
-
payload: {
|
|
4444
|
+
payload: {
|
|
4445
|
+
attempt,
|
|
4446
|
+
reason: "output_truncated_max_tokens",
|
|
4447
|
+
maxTokensWas: currentMaxTokens,
|
|
4448
|
+
maxTokensNext: escalated
|
|
4449
|
+
},
|
|
4441
4450
|
actor: "agent"
|
|
4442
4451
|
});
|
|
4452
|
+
currentMaxTokens = escalated;
|
|
4443
4453
|
continue;
|
|
4444
4454
|
}
|
|
4445
4455
|
ctx.auditLogger.append({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qatonic_innovations/qaios",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "AI QA engineer in your terminal — designs, writes, runs, heals, and explores tests for web UI and APIs with audit-grade traceability.",
|
|
6
6
|
"license": "MIT",
|