test_openai_image_edit_cost_tracking

This commit is contained in:
Ishaan Jaffer
2026-01-07 14:36:50 +05:30
parent bab43ee9dd
commit ee2b51b2d0
+11 -2
View File
@@ -322,14 +322,23 @@ async def test_openai_image_edit_cost_tracking():
litellm.logging_callback_manager._reset_all_callbacks()
litellm.callbacks = [test_custom_logger]
# Mock response for Azure image edit
# Mock response for Azure image edit with usage data for cost tracking
mock_response = {
"created": 1589478378,
"data": [
{
"b64_json": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8/5+hHgAHggJ/PchI7wAAAABJRU5ErkJggg=="
}
]
],
"usage": {
"total_tokens": 1100,
"input_tokens": 100,
"input_tokens_details": {
"image_tokens": 50,
"text_tokens": 50
},
"output_tokens": 1000
}
}
class MockResponse: