Commit 91725a5
committed
feat: expose service_tier in CompletionUsage from OpenAI Responses API
OpenAI returns service_tier (e.g. "default", "priority", "flex") in
every API response. This adds it to CompletionUsage and reads it in
the Responses plugin's handleResponseCompleted.
Changes:
- Add serviceTier?: string to CompletionUsage interface
- Read event.response.service_tier in Responses LLM1 parent c773698 commit 91725a5
4 files changed
Lines changed: 10 additions & 0 deletions
File tree
- .changeset
- agents/src/llm
- plugins/openai/src
- responses
- ws
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
| 336 | + | |
336 | 337 | | |
337 | 338 | | |
338 | 339 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
584 | 584 | | |
585 | 585 | | |
586 | 586 | | |
| 587 | + | |
587 | 588 | | |
588 | 589 | | |
589 | 590 | | |
| |||
0 commit comments