Ishaan Jaffer
9c9b71f62e
fix bedrock end of life img gen models
2025-09-27 17:02:48 -07:00
Ishaan Jaff and GitHub
51d5255452
[Bug]: Azure OpenAI & AI Foundry Reject Image Generation Payload Due to extra_body Injection in LiteLLM v1.76.3 ( #14475 )
...
* add request body azure img gen
* fix test_get_optional_params_image_gen_filters_empty_values
* test_azure_image_generation_request_body
* test_azure_image_generation_request_body
2025-09-11 19:39:06 -07:00
Ishaan Jaff
87f116bded
test fix
2025-09-08 18:46:20 -07:00
Krrish Dholakia
7a083750ce
refactor: remove 'input_fidelity' from image gen -> it's a image_edit param
2025-09-06 12:14:27 -07:00
Ifta Khairul Alam Adil
75aeca14b2
Merge branch 'main' into fix/gemini-imagen-model-name-validation
2025-08-27 21:52:47 +02:00
Ishaan Jaff and GitHub
f35ce02475
[Bug Fix] LLM Translation - Allow using dynamic api_key for image generation requests ( #14007 )
...
* fix - allow using dyanmic api key for img gen
* test_aiml_image_generation_with_dynamic_api_key
2025-08-27 10:51:24 -07:00
Ifta Khairul Alam Adil
0f5b31fd78
fix: resolve invalid model name error for Gemini Imagen models ( #13851 )
...
- Fix URL construction in Gemini image generation to strip 'gemini/' prefix
- Google AI API expects base model name without the prefix
- Update model references and pricing information for consistency
- Remove outdated image generation pricing entries
Fixes issue where models like 'gemini/imagen-4.0-fast-generate-preview-06-06'
were being rejected by the Google AI API due to incorrect URL formatting.
2025-08-27 04:17:35 +02:00
Ishaan Jaff and GitHub
9750374081
[Feat] New LLM API - AI/ML API for Image Gen ( #13893 )
...
* add LlmProviders.AIML
* add AIMLChatConfig
* add aiml
* fix AimlImageGenerationConfig
* add AimlImageGenerationConfig
* add cost_calculator
* fixes for AI ML API
* add known AIML Flux image models
* add AIML Cost Calc
* add AI/ML API
* add aiml_models
2025-08-23 13:12:44 -07:00
Ishaan Jaff and GitHub
76d25926d4
[Feat] New provider - Azure AI Flux Image Generation ( #13592 )
...
* init files
* add AzureFoundryModelInfo
* fix api_version property
* add azure_ai img gen
* use AzureFoundryModelInfo
* get_base_image_generation_call_args
* add azure_ai/FLUX-1.1-pro
* add util for route_image_generation_cost_calculator
* docs azure ai flux
* fixes for flux
* fixes for AzureFoundryFluxImageGenerationConfig
* ruff fix
2025-08-13 17:20:30 -07:00
Ishaan Jaff and GitHub
a8371d2cb1
[Feat] Add Google AI Studio Imagen4 model family ( #13065 )
...
* add gemini
* add init files
* add get_gemini_image_generation_config
* refactor transform
* TestGoogleImageGen
* fix transform
* fix transform
* add gemini_image_cost_calculator
* add cost tracking for gemini/imagen models
* docs image gen
* docs image gen
* test_get_model_info_gemini
2025-07-28 21:25:40 -07:00
Ishaan Jaff
03baf23ad1
[Feat] Add Recraft Image Generation API Support - New LLM Provider ( #12832 )
...
* add recraft
* init RecraftImageGenerationConfig
* add get_complete_url + validate_environment
* add image_generation_handler in llm http clas
* fixes for transform
* working recraft request
* fixed img gen transform
* fixes for llm http handler
* test: TestRecraftImageGeneration
* fixes for llm_http_handler
* fix RecraftImageGenerationConfig
* TestRecraftImageGenerationTransformation
* add recraft API
* docs recraft API
* fix code QA
* map_openai_params
* fix recraft
* cost tracking for recraft/recraftv3
* fix code qa check
2025-07-21 22:19:58 -07:00
Krish Dholakia and GitHub
e4e10aa4ed
Litellm dev 07 21 2025 p1 ( #12848 )
...
* fix(main.py): fix async retryer
Fixes https://github.com/BerriAI/litellm/issues/12830
* fix(forward_clientside_headers_by_model_group.py): filter out 'content-type' from forwardable headers
clientside content-type != proxy content type, can cause requests to hang
* test(tests/): update tests
2025-07-21 22:09:39 -07:00
Ishaan Jaff and GitHub
2941a555a8
[Feat] Add Recraft Image Generation API Support - New LLM Provider ( #12832 )
...
* add recraft
* init RecraftImageGenerationConfig
* add get_complete_url + validate_environment
* add image_generation_handler in llm http clas
* fixes for transform
* working recraft request
* fixed img gen transform
* fixes for llm http handler
* test: TestRecraftImageGeneration
* fixes for llm_http_handler
* fix RecraftImageGenerationConfig
* TestRecraftImageGenerationTransformation
* add recraft API
* docs recraft API
* fix code QA
* map_openai_params
* fix recraft
* cost tracking for recraft/recraftv3
* fix code qa check
2025-07-21 15:01:32 -07:00
Cole McIntosh and GitHub
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
Krrish Dholakia
058503ea11
test: skip test - model EOL
2025-05-20 15:57:12 -07:00
Krish Dholakia and GitHub
ff68cbda8e
Fix azure dall e 3 call with custom model name + Handle Bearer $LITELLM_API_KEY in x-litellm-api-key custom header ( #10776 )
...
* fix(main.py): use base model instead of user model if given
Fixes https://github.com/BerriAI/litellm/issues/10760
* feat(azure/image_generation/__init__.py): make azure image gen check more robust
Fixes https://github.com/BerriAI/litellm/issues/10760
* fix(user_api_key_auth.py): support bearer token auth for `x-litellm-api-key` header
Fixes earlier regression on vertex ai passthrough auth
* fix(user_api_key_auth.py): refactor get api key into separate function
enables easier testing
* fix: cleanup
* fix: fix linting error
* fix: cleanup
* test: update tests
2025-05-12 22:49:35 -07:00
Krrish Dholakia
7934610f63
test: update test to handle rate limit error
2025-05-10 16:15:48 -07:00
Ishaan Jaff and GitHub
2e58e47b43
[Bug Fix] Add Cost Tracking for gpt-image-1 when quality is unspecified ( #10247 )
...
* TestOpenAIGPTImage1
* fixes for cost calc
* fix ImageGenerationRequestQuality.MEDIUM
2025-04-23 15:16:40 -07:00
Ishaan Jaff
20d84ddef1
get_base_image_generation_call_args
2025-04-02 21:04:06 -07:00
Ishaan Jaff
74550df197
get_base_image_generation_call_args
2025-04-02 20:52:16 -07:00
801ecb6517
Nova Canvas complete image generation tasks ( #9177 ) ( #9525 )
...
* Nova Canvas complete image generation tasks (#9177 )
* add initial support for Amazon Nova Canvas model
Signed-off-by: omrishiv <327609+omrishiv@users.noreply.github.com >
* adjust name to AmazonNovaCanvas and map function variables to config
Signed-off-by: omrishiv <327609+omrishiv@users.noreply.github.com >
* tighten model name check
Signed-off-by: omrishiv <327609+omrishiv@users.noreply.github.com >
* fix quality mapping
Signed-off-by: omrishiv <327609+omrishiv@users.noreply.github.com >
* add premium quality in config
Signed-off-by: omrishiv <327609+omrishiv@users.noreply.github.com >
* support all Amazon Nova Canvas tasks
* remove unused import
Signed-off-by: omrishiv <327609+omrishiv@users.noreply.github.com >
* add tests for image generation tasks and fix payload
Signed-off-by: omrishiv <327609+omrishiv@users.noreply.github.com >
* add missing util file
Signed-off-by: omrishiv <327609+omrishiv@users.noreply.github.com >
* update model prices backup file
Signed-off-by: omrishiv <327609+omrishiv@users.noreply.github.com >
* remove image tasks other than text->image
Signed-off-by: omrishiv <327609+omrishiv@users.noreply.github.com >
* add color guided generation task for Nova Canvas
Signed-off-by: omrishiv <327609+omrishiv@users.noreply.github.com >
* fix merge
Signed-off-by: omrishiv <327609+omrishiv@users.noreply.github.com >
* add nova canvas image generation documentation
Signed-off-by: omrishiv <327609+omrishiv@users.noreply.github.com >
* add nova canvas unit tests
Signed-off-by: omrishiv <327609+omrishiv@users.noreply.github.com >
---------
Signed-off-by: omrishiv <327609+omrishiv@users.noreply.github.com >
Co-authored-by: Krish Dholakia <krrishdholakia@gmail.com >
* ci(config.yml): bump ci config
* test: fix test
---------
Signed-off-by: omrishiv <327609+omrishiv@users.noreply.github.com >
Co-authored-by: omrishiv <327609+omrishiv@users.noreply.github.com >
2025-03-26 11:28:20 -07:00
Krrish Dholakia
7015be8957
test: update test for correct aws region
2025-03-11 21:14:40 -07:00
0674491386
add support for Amazon Nova Canvas model ( #7838 )
...
* add initial support for Amazon Nova Canvas model
Signed-off-by: omrishiv <327609+omrishiv@users.noreply.github.com >
* adjust name to AmazonNovaCanvas and map function variables to config
Signed-off-by: omrishiv <327609+omrishiv@users.noreply.github.com >
* tighten model name check
Signed-off-by: omrishiv <327609+omrishiv@users.noreply.github.com >
* fix quality mapping
Signed-off-by: omrishiv <327609+omrishiv@users.noreply.github.com >
* add premium quality in config
Signed-off-by: omrishiv <327609+omrishiv@users.noreply.github.com >
* support all Amazon Nova Canvas tasks
* remove unused import
Signed-off-by: omrishiv <327609+omrishiv@users.noreply.github.com >
* add tests for image generation tasks and fix payload
Signed-off-by: omrishiv <327609+omrishiv@users.noreply.github.com >
* add missing util file
Signed-off-by: omrishiv <327609+omrishiv@users.noreply.github.com >
* update model prices backup file
Signed-off-by: omrishiv <327609+omrishiv@users.noreply.github.com >
* remove image tasks other than text->image
Signed-off-by: omrishiv <327609+omrishiv@users.noreply.github.com >
---------
Signed-off-by: omrishiv <327609+omrishiv@users.noreply.github.com >
Co-authored-by: Krish Dholakia <krrishdholakia@gmail.com >
2025-03-10 08:02:00 -07:00
Ishaan Jaff
137879ffea
vertex testing use pathrise-convert-1606954137718
2025-01-05 14:00:17 -08:00
Ishaan Jaff and GitHub
11e5960462
use helper for image gen tests ( #7343 )
2024-12-20 21:28:32 -08:00
920f4c9f82
(fix) add linting check to ban creating AsyncHTTPHandler during LLM calling ( #6855 )
...
* fix triton
* fix TEXT_COMPLETION_CODESTRAL
* fix REPLICATE
* fix CLARIFAI
* fix HUGGINGFACE
* add test_no_async_http_handler_usage
* fix PREDIBASE
* fix anthropic use get_async_httpx_client
* fix vertex fine tuning
* fix dbricks get_async_httpx_client
* fix get_async_httpx_client vertex
* fix get_async_httpx_client
* fix get_async_httpx_client
* fix make_async_azure_httpx_request
* fix check_for_async_http_handler
* test: cleanup mistral model
* add check for AsyncClient
* fix check_for_async_http_handler
* fix get_async_httpx_client
* fix tests using in_memory_llm_clients_cache
* fix langfuse import
* fix import
---------
Co-authored-by: Krrish Dholakia <krrishdholakia@gmail.com >
2024-11-21 19:03:02 -08:00
Ishaan Jaff and GitHub
73c7b73aa0
(feat) Add cost tracking for Azure Dall-e-3 Image Generation + use base class to ensure basic image generation tests pass ( #6716 )
...
* add BaseImageGenTest
* use 1 class for unit testing
* add debugging to BaseImageGenTest
* TestAzureOpenAIDalle3
* fix response_cost_calculator
* test_basic_image_generation
* fix img gen basic test
* fix _select_model_name_for_cost_calc
* fix test_aimage_generation_bedrock_with_optional_params
* fix undo changes cost tracking
* fix response_cost_calculator
* fix test_cost_azure_gpt_35
2024-11-12 20:02:16 -08:00
Ishaan Jaff and GitHub
25bae4cc23
(feat) add cost tracking stable diffusion 3 on Bedrock ( #6676 )
...
* add cost tracking for sd3
* test_image_generation_bedrock
* fix get model info for image cost
* add cost_calculator for stability 1 models
* add unit testing for bedrock image cost calc
* test_cost_calculator_with_no_optional_params
* add test_cost_calculator_basic
* correctly allow size Optional
* fix cost_calculator
* sd3 unit tests cost calc
2024-11-11 20:21:44 -08:00
Ishaan Jaff and GitHub
979dfe8ab2
(feat) Add Bedrock Stability.ai Stable Diffusion 3 Image Generation models ( #6673 )
...
* add bedrock image gen async support
* added async support for bedrock image gen
* move image gen testing
* add AmazonStability3Config
* add AmazonStability3Config config
* update AmazonStabilityConfig
* update get_optional_params_image_gen
* use 1 helper for _get_request_body
* add transform_response_dict_to_openai_response for stability3
* test sd3-large-v1:0
* unit testing for bedrock image gen
* fix load_vertex_ai_credentials
* fix test_aimage_generation_vertex_ai
* add stability.sd3-large-v1:0 to model cost map
* add stability.stability.sd3-large-v1:0 to docs
2024-11-08 19:26:03 -08:00
Ishaan Jaff
086e1ac5bc
move image gen testing
2024-11-08 14:10:08 -08:00