backport: completion stream + metrics and assistant content#497
Merged
aabchoo merged 3 commits intorelease/v0.1from Mar 14, 2025
Merged
backport: completion stream + metrics and assistant content#497aabchoo merged 3 commits intorelease/v0.1from
aabchoo merged 3 commits intorelease/v0.1from
Conversation
**Commit Message** extproc: add GenAI metrics to track token usage and latency Adds GenAI metrics according to the OpenTelemetry Semantic Conventions for Generative AI Metrics [1]. Note those metrics are still in experimental phase and may still be subject to change. 1: https://opentelemetry.io/docs/specs/semconv/gen-ai/gen-ai-metrics/ **Related Issues/PRs (if applicable)** This is a follow-up of #432, implementing the remaining review comments. --------- Signed-off-by: Huamin Chen <hchen@redhat.com> Signed-off-by: Ignasi Barrera <ignasi@tetrate.io>
**Commit Message** This fixes a bug in the extproc when handling stream=true requests. Previously, mode_override was set at the request body handling phase, and it was not set in the response headers phase. That resulted in buffering the entire response body which is clearly not ideal as from clients point of view, they will receive the entire streaming vs line by line. This refactors around the mode override and properly handle it. --------- Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
**Commit Message** Content type should be able to be string so adding this for compatibility. It's already done for the other types - keeping it consistent. --------- Signed-off-by: Aaron Choo <achoo30@bloomberg.net> Co-authored-by: Dan Sun <dsun20@bloomberg.net>
Member
|
nice |
Contributor
Author
|
edit: ah I have an extra space |
mathetake
approved these changes
Mar 14, 2025
mathetake
pushed a commit
that referenced
this pull request
Mar 14, 2025
**Commit Message** Updating for newest release: https://github.com/envoyproxy/ai-gateway/releases/tag/v0.1.3 **Related Issues/PRs (if applicable)** #497 Signed-off-by: Aaron Choo <achoo30@bloomberg.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Commit Message
PR to backport
mockChatCompletionMetrics, chat completion stream fix, and openai content type.Including: