Files
litellm/tests
Cole McIntosh b2080ec9af feat: add input_fidelity parameter for OpenAI image generation (#12662)
* feat: add input_fidelity parameter for OpenAI image generation

- Add input_fidelity to OpenAIImageGenerationOptionalParams type
- Update image_generation function signature to accept input_fidelity
- Add input_fidelity to default_params in get_optional_params_image_gen
- Include input_fidelity in openai_params list for proper handling
- Update documentation with input_fidelity parameter description
- Add test for input_fidelity parameter functionality

This enables control over how closely the model follows the input prompt
for gpt-image-1 model, improving prompt adherence and image quality.

* feat: add input_fidelity to optional parameters for image generation

- Include input_fidelity in the list of OpenAIImageGenerationOptionalParams
- This addition enhances the flexibility of image generation by allowing control over input fidelity.

* test: enhance test for gpt-image-1 with input_fidelity parameter

- Update test_gpt_image_1_with_input_fidelity to include mocking of OpenAI response
- Validate that the OpenAI client is called with correct parameters, including input_fidelity
- Improve response validation to ensure expected output structure and values
2025-07-16 16:56:05 -07:00
..
2025-07-12 17:07:21 -07:00
2025-05-26 22:06:53 -07:00

In total litellm runs 1000+ tests

[02/20/2025] Update:

To make it easier to contribute and map what behavior is tested,

we've started mapping the litellm directory in tests/litellm

This folder can only run mock tests.