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(plugins): ai proxy cloud identity transformers #13487

Merged
merged 2 commits into from
Aug 16, 2024

Conversation

tysoekong
Copy link
Contributor

@tysoekong tysoekong commented Aug 9, 2024

Summary

  • Fixed a bug where cloud identity authentication was not used in ai-request-transformer and ai-response-transformer plugins.
  • Re-factor "cloud SDK auth" function to be shared across many AI plugins.

Checklist

Issue reference

AG-94

@tysoekong tysoekong requested a review from fffonion August 9, 2024 14:56
@tysoekong tysoekong force-pushed the fix/ai_proxy_cloud_identity_transformers branch 2 times, most recently from f766f03 to 908ad65 Compare August 9, 2024 15:07
@AndyZhang0707 AndyZhang0707 added this to the 3.8.0 milestone Aug 13, 2024
kong/llm/drivers/shared.lua Outdated Show resolved Hide resolved
kong/llm/drivers/shared.lua Show resolved Hide resolved
@team-eng-enablement team-eng-enablement added author/community PRs from the open-source community (not Kong Inc) and removed author/community PRs from the open-source community (not Kong Inc) labels Aug 13, 2024
@tysoekong
Copy link
Contributor Author

@fffonion @liverpool8056 I done all the comments. I think many is just that I haven't commented it so well.

@tysoekong tysoekong force-pushed the fix/ai_proxy_cloud_identity_transformers branch from 3456ca2 to 727ed56 Compare August 13, 2024 16:57
@locao locao changed the title Fix/ai proxy cloud identity transformers fix(plugins): ai proxy cloud identity transformers Aug 13, 2024
@gszr
Copy link
Member

gszr commented Aug 14, 2024

@tysoekong It looks like this PR includes parts of https://github.com/Kong/kong-ee/pull/9930/files plus other changes. Could you rework commits in such a way that it closely matches https://github.com/Kong/kong-ee/pull/9930/files (including changelog) and any addition is in its own separate commit? As it's right now, we would have to squash and merge, which would result in unrelated commits being squashed together

@tysoekong
Copy link
Contributor Author

tysoekong commented Aug 14, 2024

@gszr Again this one is deliberate! It is because there are EE-only features in this plugin, that are only adjusted in https://github.com/Kong/kong-ee/pull/9930/files

It's all in the plan.

I will rebase ee 9930 when this gets picked.

@tysoekong tysoekong force-pushed the fix/ai_proxy_cloud_identity_transformers branch 2 times, most recently from 07001ef to d4ee8ca Compare August 14, 2024 19:30
@gszr
Copy link
Member

gszr commented Aug 14, 2024

@gszr Again this one is deliberate! It is because there are EE-only features in this plugin, that are only adjusted in Kong/kong-ee#9930 (files)

It's all in the plan.

I will rebase ee 9930 when this gets picked.

@tysoekong please squash last commit onto the one above it so we can rebase and merge.

@tysoekong tysoekong force-pushed the fix/ai_proxy_cloud_identity_transformers branch from d4ee8ca to 6324708 Compare August 15, 2024 08:08
Copy link
Member

@gszr gszr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some minor comments; otherwise LGTM!

kong/llm/drivers/bedrock.lua Outdated Show resolved Hide resolved
kong/llm/drivers/bedrock.lua Show resolved Hide resolved
kong/llm/drivers/bedrock.lua Outdated Show resolved Hide resolved
kong/llm/drivers/gemini.lua Outdated Show resolved Hide resolved
@tysoekong tysoekong force-pushed the fix/ai_proxy_cloud_identity_transformers branch from 6324708 to ce673be Compare August 16, 2024 08:25
Copy link
Member

@oowl oowl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fffonion fffonion merged commit 5b587f2 into master Aug 16, 2024
26 checks passed
@fffonion fffonion deleted the fix/ai_proxy_cloud_identity_transformers branch August 16, 2024 11:28
@team-gateway-bot
Copy link
Collaborator

Cherry-pick failed for master, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally.

git remote add upstream https://github.com/kong/kong-ee
git fetch upstream master
git worktree add -d .worktree/cherry-pick-13487-to-master-to-upstream upstream/master
cd .worktree/cherry-pick-13487-to-master-to-upstream
git checkout -b cherry-pick-13487-to-master-to-upstream
ancref=$(git merge-base 64a0dd1c5c22f8be266742247f6e30aabd6c08ee ce673be082229d185cd12e727160f131653a6115)
git cherry-pick -x $ancref..ce673be082229d185cd12e727160f131653a6115

@github-actions github-actions bot added the incomplete-cherry-pick A cherry-pick was incomplete and needs manual intervention label Aug 16, 2024
@AndyZhang0707 AndyZhang0707 removed the incomplete-cherry-pick A cherry-pick was incomplete and needs manual intervention label Aug 18, 2024
curiositycasualty pushed a commit that referenced this pull request Oct 15, 2024
Fixed a bug where cloud identity authentication was not used in ai-request-transformer and ai-response-transformer plugins.
Re-factor "cloud SDK auth" function to be shared across many AI plugins.

AG-94
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants