language_models: Improve token counting for providers (#32853)

We push the usage data whenever we receive it from the provider to make
sure the counting is correct after the turn has ended.

- [x] Ollama 
- [x] Copilot 
- [x] Mistral 
- [x] OpenRouter 
- [x] LMStudio

Put all the changes into a single PR open to move these to separate PR
if that makes the review and testing easier.

Release Notes:

- N/A
ed4b29f80cUmesh Yadav committed on 6/17/2025, 10:46:29 AM· committed by GitHubparentd4c9522
9 files changedLine totals unavailable