@mono-agent/agent-runtime 0.17.0 → 0.17.1
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/MIGRATION.md +5 -0
- package/package.json +1 -1
- package/src/ai/failure.js +6 -2
package/MIGRATION.md
CHANGED
|
@@ -72,6 +72,11 @@ the runtime applies them only when Bash, Exec, or a nested subagent process is
|
|
|
72
72
|
spawned. It does not mutate `process.env` or persist the values in prompts,
|
|
73
73
|
metadata, history, traces, or long-lived tool context.
|
|
74
74
|
|
|
75
|
+
- **0.17.1 Pi auth classification:** Pi 0.83 may report a missing credential as
|
|
76
|
+
`Provider is not configured: <provider>`. The runtime now classifies that
|
|
77
|
+
exact signature as `provider_auth`, allowing a configured fallback route to
|
|
78
|
+
run while avoiding a same-route retry that cannot repair absent credentials.
|
|
79
|
+
|
|
75
80
|
## 0.16.x
|
|
76
81
|
|
|
77
82
|
This baseline carries the whole 0.15.x contract forward and adds:
|
package/package.json
CHANGED
package/src/ai/failure.js
CHANGED
|
@@ -72,7 +72,11 @@ export const FAILURE_KINDS = [
|
|
|
72
72
|
|
|
73
73
|
const CONTEXT_LIMIT_RE = /(?:context[_ ](?:length|window|budget)|token[_ ]limit|(?:input|prompt)(?:[_ ]tokens?)?[_ ](?:is[_ ])?too[_ ]long|(?:input|prompt|request)(?:[_ ]tokens?)?[_ ]exceeds?[_ ](?:the[_ ])?(?:context|maximum|max|limit|allowed[_ ]size)|too[_ ]many[_ ](?:input[_ ])?tokens?|tokens?[_ ]exceed(?:s|ed)?[_ ](?:the[_ ])?(?:context|maximum|max|(?:model[_ ])?limit))/i;
|
|
74
74
|
const USAGE_LIMIT_RE = /(rate limit|usage limit|max(?:imum)?(?:[_ ]output)?[_ ]tokens?|max turns)/i;
|
|
75
|
-
|
|
75
|
+
// Pi's Models layer emits the exact `Provider is not configured: <id>` message
|
|
76
|
+
// only after it has found the provider but cannot resolve that provider's auth.
|
|
77
|
+
// Treating it as availability left credential fallbacks pinned to the dead
|
|
78
|
+
// route because the router only advances on provider_auth or retryable outages.
|
|
79
|
+
const PROVIDER_AUTH_RE = /(no api key|missing api key|api key required|invalid api key|incorrect api key|provider is not configured:|authentication|authorization|not authorized|forbidden|oauth (?:refresh|auth|authentication|token).*failed|credential store (?:read|modify) failed|401|403)/i;
|
|
76
80
|
// Mirrors the conservative connection-error/refused/failed alternation added to
|
|
77
81
|
// RETRYABLE_PROVIDER_RE / retryableProviderSubkind below for pi 0.80's terse
|
|
78
82
|
// "Connection error." — without it, classifyFailure (used directly by hosts
|
|
@@ -81,7 +85,7 @@ const PROVIDER_AUTH_RE = /(no api key|missing api key|api key required|invalid a
|
|
|
81
85
|
// "provider_unavailable".
|
|
82
86
|
const PROVIDER_UNAVAILABLE_RE = /(econn|enotfound|etimedout|timed? ?out|service unavailable|503|502|gateway|fetch failed|network|websocket|\bconnection (?:error|refused|failed)\b|\bcould not connect\b)/i;
|
|
83
87
|
const TOOL_FAILURE_RE = /(tool .* failed|mcp tool|permission denied|EACCES|read-only file system)/i;
|
|
84
|
-
const NON_RETRYABLE_PROVIDER_RE = /(invalid[_ ]request|unknown parameter|no api key|missing api key|api key required|invalid api key|incorrect api key|authentication|authorization|not authorized|forbidden|billing|insufficient[_ ]quota|quota exceeded|model[_ ]not[_ ]found|unsupported model|permission denied|bad request|401|403|404)/i;
|
|
88
|
+
const NON_RETRYABLE_PROVIDER_RE = /(invalid[_ ]request|unknown parameter|no api key|missing api key|api key required|invalid api key|incorrect api key|provider is not configured:|authentication|authorization|not authorized|forbidden|billing|insufficient[_ ]quota|quota exceeded|model[_ ]not[_ ]found|unsupported model|permission denied|bad request|401|403|404)/i;
|
|
85
89
|
// pi 0.80's openai-client-style bridge collapses a connection-refused/unreachable
|
|
86
90
|
// provider down to a terse "Connection error." with no cause text (no ECONNREFUSED,
|
|
87
91
|
// no fetch failed) — the `\bconnection (?:error|refused|failed)\b|\bcould not connect\b`
|