Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ai-proxy): do not double-gzip responses when status is not 200 #12493

Merged
merged 1 commit into from
Feb 1, 2024

Conversation

tysoekong
Copy link
Contributor

Summary

Logic error - with non-200 responses from the LLM, I was double-gzip'ing the response messages (if there was content-encoding: gzip header present).

This is a quick fix for it before 3.6.0 release, and this whole response phase can be refactored during the tech preview phase.

Checklist

  • The Pull Request has tests
  • A changelog file has been created under changelog/unreleased/kong N/A - part of new feature in 3.6.0, there is "no existing changelog" yet
  • There is a user-facing docs PR against https://github.com/Kong/docs.konghq.com - N/A - part of new feature in 3.6.0, there are "no existing docs" yet

Issue reference

Bug discovery during field testing.

@tysoekong tysoekong added cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee backport release/3.6.x labels Feb 1, 2024
@locao locao changed the title fix(ai-proxy): double-gzipping responses when status is not 200 (urgent) fix(ai-proxy): do not double-gzip responses when status is not 200 Feb 1, 2024
@locao
Copy link
Contributor

locao commented Feb 1, 2024

Skipping changelog as this is a fix for an unreleased feature.

@RobSerafini RobSerafini requested a review from a team February 1, 2024 20:20
@RobSerafini RobSerafini added this to the 3.6.0 milestone Feb 1, 2024
@tysoekong tysoekong force-pushed the fix/ai_proxy_double_gzip branch from 1ade18a to 260510d Compare February 1, 2024 20:58
@pull-request-size pull-request-size bot added size/M and removed size/XS labels Feb 1, 2024
@curiositycasualty curiositycasualty merged commit 1fb8be5 into master Feb 1, 2024
31 checks passed
@curiositycasualty curiositycasualty deleted the fix/ai_proxy_double_gzip branch February 1, 2024 21:34
github-actions bot pushed a commit that referenced this pull request Feb 1, 2024
@team-gateway-bot
Copy link
Collaborator

Successfully created backport PR for release/3.6.x:

curiositycasualty pushed a commit that referenced this pull request Feb 1, 2024
@gruceo gruceo added cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee and removed cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee labels Feb 1, 2024
@team-gateway-bot
Copy link
Collaborator

Successfully created cherry-pick PR for master:

@team-gateway-bot
Copy link
Collaborator

Backport failed for release/3.6.x, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin release/3.6.x
git worktree add -d .worktree/backport-12493-to-release/3.6.x origin/release/3.6.x
cd .worktree/backport-12493-to-release/3.6.x
git switch --create backport-12493-to-release/3.6.x
git cherry-pick -x 1fb8be5a52c0adfeceae89e2056128734ccfc489

This was referenced Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee plugins/ai-proxy size/M skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants