Ishaan Jaffer
0346d1ea23
fix
2025-11-26 17:11:33 -08:00
Sameer Kankute
3249f6dd2d
Merge pull request #17070 from BerriAI/litellm_add_vertex_ai_image_support
...
Add vertex ai image gen support for both gemini and imagen models
2025-11-26 00:04:03 +05:30
Sameer Kankute
883cfaeeaf
Add tests
2025-11-25 13:32:13 +05:30
Dmitrii Komarov
046b7efbbe
Make Bedrock image generation more consistent ( #17021 )
2025-11-24 20:58:01 -08:00
Ishaan Jaffer
8b8b31ecd8
fix img gen
2025-11-21 17:18:48 -08:00
Ishaan Jaffer
69da15e65e
test_fal_ai_image_generation_basic
2025-11-21 16:23:41 -08:00
Sameer Kankute
a2e3b942dc
Vector store files Stable Release ( #16643 )
...
* Add support for vector store files endpoints (#16490 )
* Add base code for vector store integration
* fix azure related tests and linting error
* fix mypy errors
* Add vector store files documentation
* fix mapped tests
* Add bytedance and ideogram support in fal ai (#16636 )
* Add fal ai flux pro v1.1 support (#16578 )
* Add fal ai flux pro v1.1 support
* Add tests and docs
---------
Co-authored-by: Ishaan Jaffer <ishaanjaffer0324@gmail.com >
2025-11-15 13:00:33 -08:00
Sameer Kankute
13993d6ea3
Add fal-ai/flux/schnell support ( #16580 )
2025-11-13 22:31:31 -08:00
Ishaan Jaff
b30439257b
[Feat] Add RunwayML Img Gen API support ( #16557 )
...
* TestRunwaymlImageGeneration
* fix RUNWAYML
* rename
* fix rename
* get_runwayml_image_generation_config
* get_runwayml_image_generation_config
* TestRunwaymlImageGeneration
* add RUNWAYML_POLLING_TIMEOUT
* fix rnwayml transform img gen
* runwayml_image_cost_calculator
* runwayml_image_cost_calculator
* docs runwayml
* fix runwayML polling
* test_get_first_default_fallback
2025-11-12 18:20:14 -08:00
Krish Dholakia
06906534b3
feat(audio_transcriptions/): calculate duration of audio file for cost calculation + feat (image_generations): cost tracking accuracy improved with output_format, quality, size values fixed per openai model
...
* feat(audio_transcriptions/): calculate duration of audio file for cost calculation
Fixes https://github.com/BerriAI/litellm/issues/11846
Closes https://github.com/BerriAI/litellm/issues/14605
* fix(cost_calculator.py): correctly use base model, when set
Fixes issue where azure base model was being ignored
* feat(cost_calculator.py): fix default cost tracking quality param for image generation
* feat(image_generations/): return output_format, quality, size
aligns response to openai spec and improves cost tracking accuracy
* fix(cost_calculator.py): refactor cost calculation for image generation to use image response instead of hidden params
* build: update build
* fix: fix cost calculation
* build: update poetry lock
* fix: fix ruff checks
* fix: fix aembedding
* fix: fix ruff errors
* fix: modify to catch errors
* fix: test
* fix: loosen test to handle openai lib out of sync
* fix: fix base models
* fix: fix usage object
2025-11-08 16:24:31 -08:00
Krish Dholakia
202eaeb1a2
Revert "(feat) Audio transcription - cost tracking + (feat) image generation …" ( #16409 )
...
This reverts commit c96da44265 .
2025-11-08 15:38:16 -08:00
Krish Dholakia
c96da44265
(feat) Audio transcription - cost tracking + (feat) image generation - accurate cost tracking based on output_format/quality/size
...
* feat(audio_transcriptions/): calculate duration of audio file for cost calculation
Fixes https://github.com/BerriAI/litellm/issues/11846
Closes https://github.com/BerriAI/litellm/issues/14605
* fix(cost_calculator.py): correctly use base model, when set
Fixes issue where azure base model was being ignored
* feat(cost_calculator.py): fix default cost tracking quality param for image generation
* feat(image_generations/): return output_format, quality, size
aligns response to openai spec and improves cost tracking accuracy
* fix(cost_calculator.py): refactor cost calculation for image generation to use image response instead of hidden params
* build: update build
* fix: fix cost calculation
* build: update poetry lock
* fix: fix ruff checks
* fix: fix aembedding
* fix: fix ruff errors
* fix: modify to catch errors
* fix: test
* fix: loosen test to handle openai lib out of sync
2025-11-08 15:30:46 -08:00
Ishaan Jaffer
044e26081d
test_get_request_body_nova_canvas_inference_profile_arn
2025-10-29 18:30:59 -07:00
Ishaan Jaff
99feefd614
[Feat] Add FAL AI Image Generations on LiteLLM ( #16067 )
...
* add fal-ai provider
* fix image_generation_handler
* init FalAIImageGenerationConfig
* init cost_calculator
* init FAL AI
* TestFAL_AI_ImageGeneration
* fix load_custom_provider_entrypoints
* TestFAL_AI_ImageGeneration
* add imagen4 transform FAL AI
* add FAL AI imagen 4 transform
* BaseImageGenTest
* test_fal_ai_image_generation_basic
* add BRIA + Recraft img gen
* add recraft + BRIA
* test_fal_ai_image_generation_basic
* tests for flux PRO v11
* Add FAL AI SD
* test FAL AI SD
* docs FAL AI
* docs fal ai
* Using Model-Specific Parameters
* add fal ai model prices
* add fall_ai JPG logo
* ui fixes FAL AI
* fix linting
* fix linting
* fix bedrock test_get_request_body_stability3
* test_custom_llm_provider_entrypoint
2025-10-29 13:10:51 -07:00
Ishaan Jaffer
3bd42b7ccf
test_image_generation_azure_dall_e_3
2025-10-25 15:47:40 -07:00
Krish Dholakia
346e036399
fix(opentelemetry.py): fix issue where headers were not being split correctly + feat(bedrock): add titan image generations w/ cost tracking ( #15916 )
...
* fix(opentelemetry.py): fix issue where headers were not being split correctly
* feat(bedrock/image): Support bedrock titan image generation
Closes https://github.com/BerriAI/litellm/issues/361
* build(model_prices_and_context_window.json): track titan image gen pricing
enables cost tracking per request
* feat(amazon_titan_transformation.py): support titan image generation cost tracking
* docs: document new model
* docs: update docs to indicate cost tracking + refactor rerank into separate doc
* fix: fix mypy linting error
* fix: fix type ignore
2025-10-25 13:45:13 -07:00
Ishaan Jaffer
c9bc6d593c
TestAzureOpenAIDalle3
2025-10-25 12:46:38 -07:00
Ishaan Jaff
6f69b009c8
[Fix] Dall-e-2 for Image Edits API ( #15604 )
...
* feat: add DallE2ImageEditConfig
* fix: get_openai_image_edit_config
* fix get_provider_image_edit_config
* fix _add_image_to_files
* fix DallE2ImageEditConfig
* fix TestOpenAIImageEditDallE2
2025-10-16 13:24:24 -07:00
Ishaan Jaffer
9c9b71f62e
fix bedrock end of life img gen models
2025-09-27 17:02:48 -07:00
Tim Elfrink
7c61fa3427
Add comprehensive tests for Bedrock inference profiles with Nova Canvas
...
- Test ARN format inference profile model detection
- Test model_id parameter filtering to prevent API errors
- Test cross-region inference profile format support
- Ensure backward compatibility with regular Nova Canvas models
- Cover both request body generation and parameter transformation
2025-09-15 16:53:52 +02:00
Ishaan Jaff
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
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
Ishaan Jaff
ed52b67fcf
test_image_edit_array_handling
2025-08-27 09:51:22 -07:00
Ishaan Jaff
d5440f9614
test_image_edit_array_handling
2025-08-27 08:27:57 -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
Krish Dholakia
3ed1220f75
Merge pull request #13916 from mubashir1osmani/openai-multiple-images
...
feat: multiple images in openai images/edits endpoint
2025-08-25 23:11:13 -07:00
mubashir1osmani
2fa8f971e0
feat: multiple images in openai images/edits endpoint
2025-08-23 19:13:32 -04:00
Ishaan Jaff
b9132968b2
[Perf] Improvements for Async Success Handler (Logging Callbacks) - Approx +130 RPS ( #13905 )
...
* [Performance] Reduce Significant CPU overhead from litellm_logging.py (#13895 )
* fix: litellm.configured_cold_storage_logger
* fix Session Management - Non-OpenAI Models docs
* ruff fix
* test fix
* create LoggingWorker
* add GLOBAL_LOGGING_WORKER for async task handling
* fix logging tests
* add conftest
* fix conftest
* test fix location of encode bedrock runtime modelid arn
* fix conftest.py
* tuning LoggingWorker
* conftest.py
* fix conftest batches/
* test_async_chat_azure
* event_loop
* test_bedrock_streaming_passthrough_test2
* fix GLOBAL_LOGGING_WORKER
* logging worker
* add flush for global logging worker
* Revert "fix GLOBAL_LOGGING_WORKER"
This reverts commit d254f508f48935652f054777652938ad71976cce.
* fix conftest clear_queue
* fix conftest clear_queue
* setup_and_teardown for llm translation
* docs AWS_REGION
* test_async_chat_azure
* change test DIR
* run ci/cd again
* use 1 job for litellm_router_unit_testing
* fix space
* fix litellm_router_unit_testing
* test_aaarouter_dynamic_cooldown_message_retry_time
* litellm_router_unit_testing
* conftest.py clearing qu
* fixes litellm_router_unit_testing
* fixes clear_queue
* fix router_unit_tests
* remove conftest
* add back conftest for router
* fix event loop test
* test fix
* fixes for LoggingWorker
* ruff fix
2025-08-23 13:13:23 -07:00
Ishaan Jaff
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
Krrish Dholakia
385bb15219
test: skip test
2025-08-23 11:27:46 -07:00
Krrish Dholakia
b5c4ee60bb
fix(openai/image_edits): Support 'mask' parameter for openai image edits
...
Closes https://github.com/BerriAI/litellm/issues/13528
2025-08-16 01:40:24 -07:00
Ishaan Jaff
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
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
d5ee93aa0c
[Feat] Add Recraft API - Image Edits Support ( #12874 )
...
* test_recraft_image_edit_api
* add RecraftImageEditConfig
* complete RecraftImageEditConfig
* add RecraftImageEditRequestParams in types
* update RecraftImageEditRequestParams
* working
* transform_image_edit_request
* Image Edit docs recraft
* working transform_image_edit_request
* TestRecraftImageEditTransformation
2025-07-22 15:03:08 -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
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
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
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
Ishaan Jaff
ce2934349f
[Feat] Add XInference Image Generation API Provider ( #12439 )
...
* add XInferenceImageGenerationConfig
* add get_xinference_image_generation_config
* test_xinference_image_generation
* docs Image Generation xinference
* docs inference
* docs xinference
* fix xinference img gen
2025-07-08 21:17:38 -07:00
Ishaan Jaff
a76d991952
[Fix]: Add cost tracking for image edits endpoint [OpenAI, Azure] ( #11186 )
...
* fix: add cost tracking for image edits
* fix: add cost tracking for azure image edits
* fix: fix linting error
* fix: fixes for background param
* fix: image edit test fixes
* fix: openai image edit cost tracking
2025-05-27 17:52:15 -07:00
Ishaan Jaff
1009defbdc
[Feat] Add /image/edits support for Azure ( #11160 )
...
* feat: add image edits on litellm router
* feat: add image edits endpoint
* fix: use pure async for image edits
* fix: base_process_llm_request
* fix: get_image_content_type
* feat: add image edits endpoint
* add image edits on UI
* test: image edits support
* fix: linting errors
* fix: linting errors
* test fix img gen
* feat: azure image edits
* fix: fix url construction of azure image edits
* fix: mock endpoints for azure images
2025-05-26 10:37:48 -07:00
Ishaan Jaff
702b5fec22
[Feat] Add /image/edits on LiteLLM ( #11123 )
...
* feat: add image edits on litellm router
* feat: add image edits endpoint
* fix: use pure async for image edits
* fix: base_process_llm_request
* fix: get_image_content_type
* feat: add image edits endpoint
* add image edits on UI
* test: image edits support
* fix: linting errors
* fix: linting errors
* test fix img gen
2025-05-24 10:18:01 -07:00
Ishaan Jaff
8d7e234efd
[Feat] Add content policy violation error mapping for image editd ( #11113 )
...
* feat: add image edit mapping for content policy violations
* test fix
2025-05-23 21:57:43 -07:00
Ishaan Jaff
ba4148100f
test: test_openai_image_edit_litellm_sdk
2025-05-23 17:34:03 -07:00
Ishaan Jaff
dd4a65b83a
Feat: add MCP to Responses API and bump openai python sdk ( #11029 )
...
* feat: add MCP to responses API
* feat: bump openai version to 1.75.0
* docs MCP + responses API
* fixes: type checking
* fixes: type checking
* build: use latest openai 1.81.0
* fix: linting error
* fix: linting error
* fix: test
* fix: linting errors
* fix: test
* fix: test
* fix: linting
* Revert "fix: linting"
This reverts commit ebb19ff8cb1f8fcc3e224390e351676daccb33de.
* fix: linting
2025-05-22 07:24:10 -07:00
Ishaan Jaff
e5d278c454
[Feat] Add Image Edits Support to LiteLLM ( #11020 )
...
* refactor: use 1 file for image methods
* refactor: use 1 file for image methods
* feat: add stubs for image edits
* fix: types for image edits
* feat: add async image edits
* feat: add base config for image edits
* feat: add basic structure for image edits
* feat: add ImageEditRequestUtils
* feat: complete instrumentation of image edits
* tes: test_openai_image_edit_litellm_sdk
* tets: test_openai_image_edit_litellm_sdk
* feat: get_provider_image_edit_config
* feat: add OpenAIImageEditConfig
* feat: working image edits
* fixes: working image edits
* fix: code qa
* fix: using image edits
* fix: linting errors
2025-05-21 14:03:09 -07:00
Krrish Dholakia
058503ea11
test: skip test - model EOL
2025-05-20 15:57:12 -07:00