Commit Graph

4 Commits

Author SHA1 Message Date
Sameer Kankute c545c969f7 Merge branch 'main' into litellm_oss_staging_03_17_2026 2026-03-20 08:42:41 +05:30
Avik Kumar fcea560682 fix(langsmith): populate usage_metadata in outputs for Cost column
LangSmith reads the Cost column from outputs.usage_metadata.total_cost,
but LangsmithLogger._prepare_log_data never wrote to that key. The
response_cost was already computed in StandardLoggingPayload but was
not forwarded to the outputs dict.

Inject usage_metadata with input_tokens, output_tokens, total_tokens,
and total_cost into the outputs dict so LangSmith can display cost.

Fixes #24001

Made-with: Cursor
2026-03-18 15:58:13 -04:00
Miguel Miranda Dias e9291a97c3 fix(langsmith): avoid no running event loop during sync init (#23727)
* fix(langsmith): skip periodic flush task without event loop

* fix(langsmith): lazily start periodic flush task

* test(langsmith): tighten flush task coverage

* test(langsmith): cover lazy failure flush startup

* refactor(langsmith): keep flush startup private
2026-03-16 22:34:15 -07:00
Krrish Dholakia adc71ad2e7 fix(langsmith.py): add langsmith_sampling_rate as a dynamic param
Closes LIT-879
2025-09-17 17:32:26 -07:00