Commit 565cef7
fix: Use --build-local in smoke-otel-tracing for latest api-proxy code (#3483)
* fix: use --build-local in smoke-otel-tracing to test latest api-proxy code
The workflow was using --skip-pull with pre-built GHCR images (v0.25.29)
which don't include the recently-merged otel.js module. Switch to
--build-local so the api-proxy container is built from source and
includes the OTEL tracing implementation.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: inject stream_options for token tracking in spans
Streaming OpenAI/Copilot API responses only include usage data in the
final SSE chunk when the client sends stream_options: {include_usage: true}.
Without this, the token tracker never extracts usage and OTEL spans have
no gen_ai.usage.* attributes.
The api-proxy now injects this option automatically for OpenAI-compatible
providers (copilot, openai, opencode) when stream: true is set and
stream_options is not already present.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent a935d34 commit 565cef7
4 files changed
Lines changed: 45 additions & 3 deletions
File tree
- .github/workflows
- containers/api-proxy
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
127 | 159 | | |
128 | 160 | | |
129 | 161 | | |
| 162 | + | |
130 | 163 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
346 | 346 | | |
347 | 347 | | |
348 | 348 | | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
349 | 357 | | |
350 | 358 | | |
351 | 359 | | |
| |||
0 commit comments