@kenkaiiii/gg-ai 5.63.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/dist/index.js CHANGED
@@ -2670,7 +2670,7 @@ async function* runStream3(options, retriedWithoutReasoning = false) {
2670
2670
  if (response.status === 400 && message === `The '${options.model}' model is not supported when using Codex with a ChatGPT account.`) {
2671
2671
  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.";
2672
2672
  } else if (response.status === 404 && text.includes("does not exist")) {
2673
- 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.";
2673
+ 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.";
2674
2674
  }
2675
2675
  throw new ProviderError("openai", message, {
2676
2676
  statusCode: response.status,
@@ -4054,7 +4054,8 @@ var REDACTED = "[REDACTED]";
4054
4054
  var TRUNCATED = "[TRUNCATED]";
4055
4055
  var CIRCULAR = "[CIRCULAR]";
4056
4056
  var SENSITIVE_NAME = /(?:^|[_-])(?:api[_-]?key|access[_-]?token|refresh[_-]?token|token|key|auth(?:orization)?|bearer|cookie|credential|private[_-]?key|password|passwd|secret)(?:$|[_-])/i;
4057
- 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;
4057
+ 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;
4058
+ 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;
4058
4059
  function escaped(value) {
4059
4060
  return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
4060
4061
  }
@@ -4083,8 +4084,11 @@ function redactText(text, options = {}) {
4083
4084
  /\b(authorization\s*[:=]\s*)(?:bearer|basic)\s+[^\s,;]+/gi,
4084
4085
  `$1${REDACTED}`
4085
4086
  );
4086
- result = result.replace(/\b(bearer|basic)\s+[A-Za-z0-9+/_.=-]{8,}/gi, `$1 ${REDACTED}`);
4087
- result = result.replace(/\b(cookie|set-cookie)(\s*[:=]\s*)[^\r\n]+/gi, `$1$2${REDACTED}`);
4087
+ result = result.replace(
4088
+ /\b(bearer|basic)\s+(?![A-Za-z][a-z]{0,14}\b)[A-Za-z0-9+/_.=-]{8,}/gi,
4089
+ `$1 ${REDACTED}`
4090
+ );
4091
+ result = result.replace(/\b(cookie|set-cookie)(\s*:\s*)[^\s=;:]+=[^\r\n]*/gi, `$1$2${REDACTED}`);
4088
4092
  result = result.replace(
4089
4093
  /\beyJ[A-Za-z0-9_-]{6,}\.[A-Za-z0-9_-]{6,}\.[A-Za-z0-9_-]{6,}\b/g,
4090
4094
  REDACTED
@@ -4094,8 +4098,12 @@ function redactText(text, options = {}) {
4094
4098
  REDACTED
4095
4099
  );
4096
4100
  result = result.replace(
4097
- SENSITIVE_ASSIGNMENT,
4098
- (_match, name, separator) => `${name}${separator}${REDACTED}`
4101
+ ENV_SECRET_ASSIGNMENT,
4102
+ (_match, name, separator, quote) => `${name}${separator}${quote}${REDACTED}${quote}`
4103
+ );
4104
+ result = result.replace(
4105
+ COMPACT_SECRET_ASSIGNMENT,
4106
+ (_match, name, quote) => `${name}=${quote}${REDACTED}${quote}`
4099
4107
  );
4100
4108
  for (const secret of normalizedSecrets(options.secrets)) {
4101
4109
  result = result.replace(new RegExp(escaped(secret), "g"), REDACTED);