Skip to content

fix: prevent 500 errors from missing logger level check - #426

Closed
zaixiakongyiji wants to merge 1 commit into
su-kaka:masterfrom
zaixiakongyiji:fix/logger-is-enabled-for-500
Closed

zaixiakongyiji wants to merge 1 commit into
su-kaka:masterfrom
zaixiakongyiji:fix/logger-is-enabled-for-500

Conversation

@zaixiakongyiji

Copy link
Copy Markdown

Problem

Requests that reached normalize_gemini_request() failed with HTTP 500 because the custom Logger implementation did not provide the is_enabled_for() method used by the converter.

Fix

Add Logger.is_enabled_for() with the same level-threshold semantics as the existing logger, while preserving the debug log guard in normalize_gemini_request().

Validation

  • python -m compileall -q log.py src tests/test_gemini_normalize.py
  • Direct async smoke test for normalize_gemini_request() passed.
  • Added a regression test covering normalization with the logger guard.

The full pytest suite could not be run in this environment because pytest is not installed in the available Python environments.

@zaixiakongyiji zaixiakongyiji mentioned this pull request Oct 10, 2026
2 tasks done
@su-kaka su-kaka closed this Oct 11, 2026
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