@maintainabilityai/research-runner 0.1.17 → 0.1.18

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.
@@ -67,17 +67,24 @@ async function callAnthropicTier(opts, tierModels) {
67
67
  };
68
68
  }
69
69
  /**
70
- * GitHub Models returns 401 / 403 / 404 when the token can't reach the
71
- * requested model (typically the workflow bot token hitting a "custom"-
72
- * tier model like gpt-5-chat). These are recoverable via fallback;
73
- * everything else (timeouts, 5xx, 413 cap, parse errors) should
74
- * propagate.
70
+ * GitHub Models returns these statuses when the token can't reach the
71
+ * requested model or is being throttled. All recoverable via the
72
+ * github-models→github-models fallback (custom-tier low-tier).
73
+ *
74
+ * 401 / 403 — token lacks `models:read` or hasn't been enrolled in
75
+ * the custom tier (workflow bot vs Copilot PAT)
76
+ * 404 — model id not visible to this token tier
77
+ * 429 — rate limited on the primary tier; the low-tier model
78
+ * has its own bucket so the fallback often succeeds
79
+ *
80
+ * Everything else (timeouts, 5xx, 413 token cap, parse errors)
81
+ * propagates — those are not "wrong model" problems.
75
82
  */
76
83
  function isModelAccessError(err) {
77
84
  if (!(err instanceof Error)) {
78
85
  return false;
79
86
  }
80
- return /GitHub Models returned 40[134]:/.test(err.message);
87
+ return /GitHub Models returned (?:401|403|404|429):/.test(err.message);
81
88
  }
82
89
  async function callGitHubModelsTier(opts, tierModels) {
83
90
  if (!opts.githubToken) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maintainabilityai/research-runner",
3
- "version": "0.1.17",
3
+ "version": "0.1.18",
4
4
  "description": "Research + PRD agent runner — orchestrates the Archeologist and PRD pipelines for the MaintainabilityAI governance mesh",
5
5
  "license": "MIT",
6
6
  "author": "MaintainabilityAI",