litellm/tests/image_gen_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
..
base_image_generation_test.py Feat: add MCP to Responses API and bump openai python sdk (#11029) 2025-05-22 07:24:10 -07:00
ishaan_github.png [Feat] Add Image Edits Support to LiteLLM (#11020) 2025-05-21 14:03:09 -07:00
litellm_site.png [Feat] Add Image Edits Support to LiteLLM (#11020) 2025-05-21 14:03:09 -07:00
test_bedrock_image_gen_unit_tests.py Nova Canvas complete image generation tasks (#9177) (#9525) 2025-03-26 11:28:20 -07:00
test_image.png [BETA] Add OpenAI /images/variations + Topaz API support (#7700) 2025-01-11 23:27:46 -08:00
test_image_edit.png [Feat] Add /image/edits support for Azure (#11160) 2025-05-26 10:37:48 -07:00
test_image_edits.py [Fix]: Add cost tracking for image edits endpoint [OpenAI, Azure] (#11186) 2025-05-27 17:52:15 -07:00
test_image_generation.py feat: add input_fidelity parameter for OpenAI image generation (#12662) 2025-07-16 16:56:05 -07:00
test_image_variation.py Litellm dev 01 21 2025 p1 (#7898) 2025-01-21 20:36:11 -08:00
test_xinference.py [Feat] Add XInference Image Generation API Provider (#12439) 2025-07-08 21:17:38 -07:00
vertex_key.json ci/cd update vertex acct 2025-01-05 13:43:32 -08:00