@kenkaiiii/gg-ai 5.62.0 → 5.64.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/README.md CHANGED
@@ -40,7 +40,7 @@ Tool parameters are Zod schemas. Converted to JSON Schema at the provider bounda
40
40
 
41
41
  | Provider | Models | Notes |
42
42
  |---|---|---|
43
- | `anthropic` | Claude Opus 5, Sonnet 5, Haiku 4.5 | Extended thinking, prompt caching, server-side compaction |
43
+ | `anthropic` | Claude Opus 5.5, Sonnet 5, Haiku 4.5 | Extended thinking, prompt caching, server-side compaction |
44
44
  | `openai` | GPT-4.1, o3, o4-mini | Supports OAuth (codex endpoint) and API keys |
45
45
  | `glm` | GLM-5.3 | Z.AI platform, OpenAI-compatible |
46
46
  | `moonshot` | Kimi K3, Kimi K2.7 Code | Moonshot platform, OpenAI-compatible |
package/dist/index.cjs CHANGED
@@ -2737,7 +2737,7 @@ async function* runStream3(options, retriedWithoutReasoning = false) {
2737
2737
  if (response.status === 400 && message === `The '${options.model}' model is not supported when using Codex with a ChatGPT account.`) {
2738
2738
  hint = "This model is not available through your ChatGPT account. Switch to a model listed for OpenAI via the model selector, or check your ChatGPT usage limits.";
2739
2739
  } else if (response.status === 404 && text.includes("does not exist")) {
2740
- hint = "This model is not in OpenAI's current catalog for your ChatGPT account. Switch to GPT-6 Astra, GPT-5.6 Sol, GPT-5.6 Terra, or GPT-5.6 Luna via the model selector.";
2740
+ hint = "This model is not in OpenAI's current catalog for your ChatGPT account. Switch to GPT-6 Astra, GPT-6 Sol, or GPT-6 Luna via the model selector.";
2741
2741
  }
2742
2742
  throw new ProviderError("openai", message, {
2743
2743
  statusCode: response.status,
@@ -4121,7 +4121,8 @@ var REDACTED = "[REDACTED]";
4121
4121
  var TRUNCATED = "[TRUNCATED]";
4122
4122
  var CIRCULAR = "[CIRCULAR]";
4123
4123
  var SENSITIVE_NAME = /(?:^|[_-])(?:api[_-]?key|access[_-]?token|refresh[_-]?token|token|key|auth(?:orization)?|bearer|cookie|credential|private[_-]?key|password|passwd|secret)(?:$|[_-])/i;
4124
- var SENSITIVE_ASSIGNMENT = /\b((?:api[_-]?key|access[_-]?token|refresh[_-]?token|token|key|auth(?:orization)?|bearer|cookie|credential|private[_-]?key|password|passwd|secret))\b(\s*[=:]\s*)(["']?)([^\s,"';}]+)\3/gi;
4124
+ var ENV_SECRET_ASSIGNMENT = /\b((?:[A-Z0-9]+_)*(?:API_?KEY|ACCESS_TOKEN|REFRESH_TOKEN|TOKEN|KEY|AUTH|AUTHORIZATION|BEARER|CREDENTIALS?|PASSWORD|PASSWD|SECRET))\b(\s*[=:]\s*)(["']?)(?!\$|process\.env|os\.environ|import\.meta|env\.)(?=[^\s,"';}]*\d)([^\s,"';}=$][^\s,"';}]{7,})\3/g;
4125
+ var COMPACT_SECRET_ASSIGNMENT = /\b((?:[a-z0-9]+[_-])*(?:api[_-]?key|access[_-]?token|refresh[_-]?token|token|auth|authorization|credentials?|password|passwd|secret)|(?:[a-z0-9]+[_-])+key)=(["']?)(?!\$)([^\s,"'&;}=][^\s,"'&;}]{7,})\2/gi;
4125
4126
  function escaped(value) {
4126
4127
  return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
4127
4128
  }
@@ -4150,8 +4151,11 @@ function redactText(text, options = {}) {
4150
4151
  /\b(authorization\s*[:=]\s*)(?:bearer|basic)\s+[^\s,;]+/gi,
4151
4152
  `$1${REDACTED}`
4152
4153
  );
4153
- result = result.replace(/\b(bearer|basic)\s+[A-Za-z0-9+/_.=-]{8,}/gi, `$1 ${REDACTED}`);
4154
- result = result.replace(/\b(cookie|set-cookie)(\s*[:=]\s*)[^\r\n]+/gi, `$1$2${REDACTED}`);
4154
+ result = result.replace(
4155
+ /\b(bearer|basic)\s+(?![A-Za-z][a-z]{0,14}\b)[A-Za-z0-9+/_.=-]{8,}/gi,
4156
+ `$1 ${REDACTED}`
4157
+ );
4158
+ result = result.replace(/\b(cookie|set-cookie)(\s*:\s*)[^\s=;:]+=[^\r\n]*/gi, `$1$2${REDACTED}`);
4155
4159
  result = result.replace(
4156
4160
  /\beyJ[A-Za-z0-9_-]{6,}\.[A-Za-z0-9_-]{6,}\.[A-Za-z0-9_-]{6,}\b/g,
4157
4161
  REDACTED
@@ -4161,8 +4165,12 @@ function redactText(text, options = {}) {
4161
4165
  REDACTED
4162
4166
  );
4163
4167
  result = result.replace(
4164
- SENSITIVE_ASSIGNMENT,
4165
- (_match, name, separator) => `${name}${separator}${REDACTED}`
4168
+ ENV_SECRET_ASSIGNMENT,
4169
+ (_match, name, separator, quote) => `${name}${separator}${quote}${REDACTED}${quote}`
4170
+ );
4171
+ result = result.replace(
4172
+ COMPACT_SECRET_ASSIGNMENT,
4173
+ (_match, name, quote) => `${name}=${quote}${REDACTED}${quote}`
4166
4174
  );
4167
4175
  for (const secret of normalizedSecrets(options.secrets)) {
4168
4176
  result = result.replace(new RegExp(escaped(secret), "g"), REDACTED);