Gemini API rejects int-valued enums (StrengthLevel) in response_schema, raising a validation error before any request is sent. Fix by introducing AIActiveIngredient (inherits ActiveIngredient, overrides strength_level and irritation_potential as Optional[int]) and ProductParseLLMResponse used only as the Gemini schema. The two-step validation converts ints back to StrengthLevel via Pydantic coercion. Adds a test covering the numeric strength level path. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| conftest.py | ||
| test_health.py | ||
| test_inventory.py | ||
| test_product_model.py | ||
| test_products.py | ||
| test_routines.py | ||
| test_skincare.py | ||