Skip to content

Conversation

girlsending0
Copy link

@girlsending0 girlsending0 commented Aug 27, 2025

Description:
This PR fixes an issue where stream_usage metadata was not being returned during invoke or stream calls for HuggingFace chat models.
I updated ChatHuggingFace (via ChatHuggingFaceWithUsage) to align with BaseChatOpenAI behavior, ensuring usage information is properly included in streaming outputs.

Issue: N/A (but addresses missing usage metadata in HuggingFace integration).

Dependencies: None

Twitter handle: None

Copy link

vercel bot commented Aug 27, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
langchain Ignored Ignored Preview Aug 27, 2025 7:09am

Copy link

codspeed-hq bot commented Aug 27, 2025

CodSpeed WallTime Performance Report

Merging #32708 will improve performances by 11.61%

Comparing girlsending0:fix/add_stream_usage (7ffd183) with master (c6c7fce)

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

Summary

⚡ 1 improvements
✅ 12 untouched benchmarks

Benchmarks breakdown

Benchmark BASE HEAD Change
test_import_time[PydanticOutputParser] 412.1 ms 369.2 ms +11.61%

Copy link

codspeed-hq bot commented Aug 27, 2025

CodSpeed Instrumentation Performance Report

Merging #32708 will not alter performance

Comparing girlsending0:fix/add_stream_usage (7ffd183) with master (c6c7fce)

Summary

✅ 14 untouched benchmarks

@mdrxy mdrxy changed the title fix(huggingface): add stream_usage support for ChatHuggingFace invoke/stream fix(huggingface): add stream_usage support for ChatHuggingFace invoke/stream Aug 27, 2025
@mdrxy mdrxy added the integration Related to a provider partner package integration label Aug 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration Related to a provider partner package integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants