Skip to content

fix: add Gemini API key to credential redaction and add missing unicode regex flags#378

Merged
Colin Francis (colifran) merged 1 commit into
langchain-ai:mainfrom
fix2015:fix/gemini-key-redaction-and-regex-flags
Jul 17, 2026
Merged

fix: add Gemini API key to credential redaction and add missing unicode regex flags#378
Colin Francis (colifran) merged 1 commit into
langchain-ai:mainfrom
fix2015:fix/gemini-key-redaction-and-regex-flags

Conversation

@fix2015

Copy link
Copy Markdown
Contributor

Summary

  • Add GEMINI_API_KEY to credential redaction in sanitizeDiagnosticText (src/diagnostics.ts). The constant GEMINI_API_KEY_ENV_KEY already existed in constants.ts but was missing from the redaction list, meaning Gemini API keys could leak into diagnostic output.
  • Fix missing punctuation in the OAuth completion HTML page (src/agent/openai-chatgpt-oauth.ts). The sentence "OpenWiki login complete you can close this tab." was a run-on; added a period and capitalized accordingly.
  • Add unicode (u) flag to regex patterns in src/telemetry/gates.ts and src/telemetry/senders.ts for consistency with the rest of the codebase and correct handling of unicode input.

Test plan

  • Verify sanitizeDiagnosticText redacts GEMINI_API_KEY values from diagnostic output
  • Confirm OAuth completion page renders correct punctuation
  • Confirm regex replacements in telemetry code behave identically for ASCII input and correctly for unicode input

@colifran Colin Francis (colifran) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@colifran
Colin Francis (colifran) merged commit 703ab52 into langchain-ai:main Jul 17, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants