Ë
    uPêj¥  ã                   ó<   — d dl mZmZ d dlZd dlmZ dededefd„Zy)é    )ÚAnyÚFinalN)ÚImageResponseÚmodelÚimage_responseÚreturnc                 ó<  — t        j                  | t         j                  j                  j                  ¬«      }|j                  d«      xs d}d}t        |t        «      r&|j                  rt        |j                  «      }||z  S t        dt        |«      › �«      ‚)zÈ
    RunwayML image generation cost calculator.

    RunwayML charges per image generated, not per pixel.
    Pricing is stored in model_prices_and_context_window.json with output_cost_per_image.
    )r   Úcustom_llm_providerÚoutput_cost_per_imageg        r   z7image_response must be of type ImageResponse, got type=)ÚlitellmÚget_model_infoÚLlmProvidersÚRUNWAYMLÚvalueÚgetÚ
isinstancer   ÚdataÚlenÚ
ValueErrorÚtype)r   r   Ú_model_infor   Ú
num_imagess        új/home/oem/CyberBrain26-unified/.venv/lib/python3.12/site-packages/litellm/llms/runwayml/cost_calculator.pyÚcost_calculatorr      s’   € ô !×/Ñ/ØÜ#×0Ñ0×9Ñ9×?Ñ?ô€Kð +6¯/©/Ð:QÓ*RÒ*YÐVYÐØ€JÜ�.¤-Ô0Ø×ÒÜ˜^×0Ñ0Ó1ˆJØ$ zÑ1Ð1äÐRÔSWÐXfÓSgÐRhÐiÓjÐjó    )	Útypingr   r   r   Úlitellm.types.utilsr   ÚstrÚfloatr   © r   r   ú<module>r!      s1   ðß ã Ý -ðkØðkàðkð ôkr   