@kenkaiiii/gg-ai 4.7.0 → 4.8.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/dist/index.js CHANGED
@@ -84,10 +84,25 @@ function formatResetTime(resetsAt) {
84
84
  minute: "2-digit"
85
85
  });
86
86
  }
87
+ function isMythosAccessError(message) {
88
+ const lower = message.toLowerCase();
89
+ return lower.includes("mythos") && (lower.includes("not_found") || lower.includes("not found") || lower.includes("no access"));
90
+ }
87
91
  function formatError(err) {
88
92
  if (err instanceof ProviderError) {
89
93
  const name = providerDisplayName(err.provider);
90
94
  const cleanMessage = cleanProviderMessage(err.message);
95
+ if (isMythosAccessError(cleanMessage)) {
96
+ return {
97
+ headline: "Claude Mythos 5 is invitation-only.",
98
+ source: "provider",
99
+ message: "Your Anthropic account isn't approved for Project Glasswing, so the API reports the model as not found.",
100
+ provider: err.provider,
101
+ statusCode: err.statusCode,
102
+ ...err.requestId ? { requestId: err.requestId } : {},
103
+ guidance: "Request access via your Anthropic account team (see platform.claude.com/docs/en/about-claude/models/overview), or switch to claude-fable-5 with /model \u2014 same underlying model, generally available."
104
+ };
105
+ }
91
106
  if (isUsageLimitError(err)) {
92
107
  const resetClause = err.resetsAt ? ` It resets at ${formatResetTime(err.resetsAt)}.` : "";
93
108
  return {
@@ -730,7 +745,7 @@ function toAnthropicToolChoice(choice) {
730
745
  return { type: "tool", name: choice.name };
731
746
  }
732
747
  function isAdaptiveThinkingModel(model) {
733
- return /opus-4[-.]8|opus-4[-.]7|opus-4[-.]6|sonnet-4[-.]6/.test(model);
748
+ return /opus-4[-.]8|opus-4[-.]7|opus-4[-.]6|sonnet-4[-.]6|fable-5|mythos-5/.test(model);
734
749
  }
735
750
  function toAnthropicThinking(level, maxTokens, model) {
736
751
  if (isAdaptiveThinkingModel(model)) {