* feat: add _fix_enum_types function to remove enums from non-string fields in schema
* test: add test for _fix_enum_types function to validate enum removal from non-string fields
* fix(gemini): exclude image models from automatic thinking_level parameter (#17013)
- gemini-3-pro-image-preview does not support thinking_level parameter
- Added check to skip adding thinkingConfig for models containing "image"
- Fixes BadRequestError: "Thinking level is not supported for this model"
- Only affects automatic default behavior, user can still pass reasoning_effort explicitly
Fixes#17013
* test: add tests for gemini-3 image models thinking_level exclusion
* update docs
* propagate model id on errors too
* make it work for messages and streaming
* fix
* cleanup
* cleanup
* final
* cleanup
* clean up method name and fix responses api streaming
* remove comment
- Replace Logging type annotations with LiteLLMLoggingObj in main.py (lines 1157, 4097, 5811)
- Fixes NameError: name 'Logging' is not defined errors
- Maintains lazy loading benefits - Logging only loaded when accessed via litellm.Logging
- Add error handling to lazy import functions for better debugging
Adds null/empty check before processing contents in GoogleAIStudioTokenCounter
to prevent errors when contents is None or empty.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>
* add claude opus 4.5
* Apply suggestion from @Chesars
Co-authored-by: Cesar Garcia <128240629+Chesars@users.noreply.github.com>
---------
Co-authored-by: Cesar Garcia <128240629+Chesars@users.noreply.github.com>
* add prompt security guardrails provider
* cosmetic
* small
* add file sanitization and update context window
* add pdf and OOXML files support
* add system prompt support
* add tests and documentation
* remove print
* fix PLR0915 Too many statements (96 > 50)
* cosmetic
* fix mypy error
* Fix failed tests due to naming conflict of responses directory with same-named pip package
* Fix mypy error: use 'aembedding' instead of 'embeddings' for async embedding call type
* Fix: Install enterprise package into Poetry virtualenv for tests
The GitHub Actions workflow was installing litellm-enterprise to system Python
using 'python -m pip install -e .', but tests run in Poetry's virtualenv using
'poetry run pytest'. This caused ImportError for enterprise package types.
Changed to 'poetry run pip install -e .' so the package is available in the
same virtualenv where pytest executes.
Fixes enterprise test collection errors in GitHub Actions CI.
* Move Prompt Security guardrail tests to tests/test_litellm/
Per reviewer feedback, move test_prompt_security_guardrails.py from
tests/guardrails_tests/ to tests/test_litellm/proxy/guardrails/ so
it will be executed by GitHub Actions workflow test-litellm.yml.
This ensures the Prompt Security integration tests run in CI.
---------
Co-authored-by: Ori Tabac <oritabac@prompt.security>
Co-authored-by: Vitaly Neyman <vitaly@prompt.security>