Commit fd8a296
committed
🤖 fix: include step providerMetadata in liveUsage for cache creation display
During streaming, liveUsage (context window display) showed 0 cache creation
tokens because it wasn't receiving providerMetadata. The cache creation token
count is Anthropic-specific and only available in providerMetadata.anthropic.
cacheCreationInputTokens, not in the standard LanguageModelV2Usage.
Thread step-level providerMetadata from backend through IPC to frontend,
mirroring the existing pattern for cumulative provider metadata.
_Generated with mux_1 parent 76d8779 commit fd8a296
File tree
4 files changed
+23
-1
lines changed- src
- browser
- stores
- utils/messages
- common/types
- node/services
4 files changed
+23
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
493 | 493 | | |
494 | 494 | | |
495 | 495 | | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
496 | 499 | | |
497 | | - | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
498 | 503 | | |
499 | 504 | | |
500 | 505 | | |
| |||
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
| 82 | + | |
81 | 83 | | |
82 | 84 | | |
83 | 85 | | |
| |||
1061 | 1063 | | |
1062 | 1064 | | |
1063 | 1065 | | |
| 1066 | + | |
1064 | 1067 | | |
1065 | 1068 | | |
1066 | 1069 | | |
| |||
1071 | 1074 | | |
1072 | 1075 | | |
1073 | 1076 | | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
1074 | 1081 | | |
1075 | 1082 | | |
1076 | 1083 | | |
| |||
1104 | 1111 | | |
1105 | 1112 | | |
1106 | 1113 | | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
1107 | 1121 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
| 151 | + | |
| 152 | + | |
151 | 153 | | |
152 | 154 | | |
153 | 155 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
972 | 972 | | |
973 | 973 | | |
974 | 974 | | |
| 975 | + | |
975 | 976 | | |
976 | 977 | | |
977 | 978 | | |
| |||
0 commit comments