@kenkaiiii/gg-ai 4.7.0 → 4.8.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/dist/index.cjs +16 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +16 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -138,10 +138,25 @@ function formatResetTime(resetsAt) {
|
|
|
138
138
|
minute: "2-digit"
|
|
139
139
|
});
|
|
140
140
|
}
|
|
141
|
+
function isMythosAccessError(message) {
|
|
142
|
+
const lower = message.toLowerCase();
|
|
143
|
+
return lower.includes("mythos") && (lower.includes("not_found") || lower.includes("not found") || lower.includes("no access"));
|
|
144
|
+
}
|
|
141
145
|
function formatError(err) {
|
|
142
146
|
if (err instanceof ProviderError) {
|
|
143
147
|
const name = providerDisplayName(err.provider);
|
|
144
148
|
const cleanMessage = cleanProviderMessage(err.message);
|
|
149
|
+
if (isMythosAccessError(cleanMessage)) {
|
|
150
|
+
return {
|
|
151
|
+
headline: "Claude Mythos 5 is invitation-only.",
|
|
152
|
+
source: "provider",
|
|
153
|
+
message: "Your Anthropic account isn't approved for Project Glasswing, so the API reports the model as not found.",
|
|
154
|
+
provider: err.provider,
|
|
155
|
+
statusCode: err.statusCode,
|
|
156
|
+
...err.requestId ? { requestId: err.requestId } : {},
|
|
157
|
+
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."
|
|
158
|
+
};
|
|
159
|
+
}
|
|
145
160
|
if (isUsageLimitError(err)) {
|
|
146
161
|
const resetClause = err.resetsAt ? ` It resets at ${formatResetTime(err.resetsAt)}.` : "";
|
|
147
162
|
return {
|
|
@@ -784,7 +799,7 @@ function toAnthropicToolChoice(choice) {
|
|
|
784
799
|
return { type: "tool", name: choice.name };
|
|
785
800
|
}
|
|
786
801
|
function isAdaptiveThinkingModel(model) {
|
|
787
|
-
return /opus-4[-.]8|opus-4[-.]7|opus-4[-.]6|sonnet-4[-.]6/.test(model);
|
|
802
|
+
return /opus-4[-.]8|opus-4[-.]7|opus-4[-.]6|sonnet-4[-.]6|fable-5|mythos-5/.test(model);
|
|
788
803
|
}
|
|
789
804
|
function toAnthropicThinking(level, maxTokens, model) {
|
|
790
805
|
if (isAdaptiveThinkingModel(model)) {
|