Commit Graph

7 Commits

Author SHA1 Message Date
Daniel Sabanov 0ecc38519e [Bug] Updated spend would not be sent to CloudZero (#16201)
* Address a bug where cloudzero spend is not sent to cloudzero if a spend
update happens

* revert change unrelated to PR

* use polars for mocking instead of sqlite
2025-11-10 19:43:15 -08:00
Ishaan Jaff b1552cae46 fix mocked CZ tests 2025-09-06 14:33:02 -07:00
Ishaan Jaff fc7accad74 test_dry_run_export_usage_data_cbf_transformation_failure 2025-09-06 13:59:28 -07:00
Ishaan Jaff 5310bba35b [Feat] Litellm x CloudZero Integration - Cost Tracking (#14296)
* fix: just pull LiteLLM_DailyUserSpend

* get the team_id from user daily spend table

* cloudzero_dry_run_export

* fix CZ endpoints

* trace entity_id

* fix: get_usage_data

* fix get_usage_data

* fix _create_cbf_record

* fix get_usage_data

* ensure start and end time is used for exporting data

* fix init_cloudzero_background_job

* fix CloudZeroExportRequest

* fix initialize_cloudzero_export_job

* fix initialize_cloudzero_export_job

* allow init with env + config.yaml for cloudzero

* fix: init CZ through config.yaml

* fix DRY run on CZ

* TestCloudZeroDryRunEndpoint

* fix: CLOUDZERO_EXPORT_INTERVAL_MINUTES

* fix init_cloudzero_background_job

* fix exporting data

* fix transform

* stash cloudzero docs

* docs: CloudZero

* ruff fix

* fix rendering key alias

* fix polars
2025-09-05 21:29:41 -07:00
Ishaan Jaff 0a60390521 Revert "[Feat] LiteLLM CloudZero Integration updates - using LiteLLM_SpendLogs Table (#12922)"
This reverts commit e3b752d3dc.
2025-09-05 10:04:07 -07:00
Ishaan Jaff e3b752d3dc [Feat] LiteLLM CloudZero Integration updates - using LiteLLM_SpendLogs Table (#12922)
* use spend logs in transform.py

* fixes for using spend logs

* get_usage_data

* update get_usage_data_for_hour

* fix CloudZeroLogger

* fixes for cloudzero_dry_run_export

* working DB read

* fix _aggregate_to_hourly

* update cloudzero endpoints

* fix cloudzero_export

* fixes for CBF transformer

* use init_background_job on saving cz settings

* add is_cloudzero_setup_in_db

* init cz on startup

* fixes for CZ transform

* fix ruff check

* fix LOC violation
2025-07-23 18:46:50 -07:00
Ishaan Jaff 99ad24c683 [Feat] LiteLLM x Cloudzero integration - Allow exporting spend to cloudzero (#12908)
* add cz init

* add DataAnalyzer

* add CZRNGenerator -> LiteLLM resource generator

* add CloudZeroStreamer

* add CBFTransformer

* add cloudzero DB connection

* add config

* add cli.py

* cleanup

* add CloudZeroLogger

* add CloudZeroLogger

* update CloudZeroLogger

* add cloudzero_router to litellm proxy

* add CloudZeroInitRequest

* add cloudzero spend endpoints

* simple dry run endpoint

* refactor dir structure

* add well types CBFRecord

* TestCBFTransformer

* TestCloudZeroStreamer

* ruff fix

* add polars pip + docker requirements.txt

* _group_by_date

* update code qa check

* docs for CZ params
2025-07-23 13:00:58 -07:00