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

Add OIDC + unit test for bedrock httpx #3688

Merged
merged 5 commits into from
May 31, 2024

Conversation

Manouchehri
Copy link
Collaborator

@Manouchehri Manouchehri commented May 16, 2024

Title

Relevant issues

Fixes #3578.

Type

✅ Test

Changes

Adds an untested unit test. Cannot test until #3578 (comment) is resolved.

[REQUIRED] Testing - Attach a screenshot of any new tests passing locally

N/A, can't run it myself. You should be able to run the CircleCI tests and have it work now.

Copy link

vercel bot commented May 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
litellm ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 31, 2024 1:51pm

@Manouchehri
Copy link
Collaborator Author

@krrishdholakia I just gave you access to an IAM role I created instead of trying to fool around with fake mocked responses. This way you can merge it in now without having to do the following that I already did:

This is how I created it for my own account:

image image

Inline policy:

{
	"Version": "2012-10-17",
	"Statement": [
		{
			"Sid": "VisualEditor0",
			"Effect": "Allow",
			"Action": [
				"bedrock:InvokeModel",
				"bedrock:InvokeModelWithResponseStream"
			],
			"Resource": [
				"arn:aws:bedrock:*::foundation-model/anthropic.claude-3-haiku-20240307-v1:0",
				"arn:aws:bedrock:*::foundation-model/cohere.command-r-v1:0"
			]
		}
	]
}
image

Full trust policy:

{
	"Version": "2012-10-17",
	"Statement": [
		{
			"Effect": "Allow",
			"Principal": {
				"Federated": "arn:aws:iam::335785316107:oidc-provider/oidc.circleci.com/org/c5a99188-154f-4f69-8da2-b442b1bf78dd"
			},
			"Action": "sts:AssumeRoleWithWebIdentity",
			"Condition": {
				"StringEquals": {
					"oidc.circleci.com/org/c5a99188-154f-4f69-8da2-b442b1bf78dd:aud": "c5a99188-154f-4f69-8da2-b442b1bf78dd"
				},
				"StringLike": {
					"oidc.circleci.com/org/c5a99188-154f-4f69-8da2-b442b1bf78dd:sub": "org/c5a99188-154f-4f69-8da2-b442b1bf78dd/project/*/user/*/vcs-origin/github.com/BerriAI/litellm/vcs-ref/refs/heads/*"
				}
			}
		}
	]
}

@Manouchehri Manouchehri changed the title Add OIDC unit test for bedrock httpx Add OIDC + unit test for bedrock httpx May 31, 2024
@Manouchehri Manouchehri added high priority enhancement New feature or request labels May 31, 2024
@krrishdholakia
Copy link
Contributor

will get this merged today @Manouchehri - waiting on main to be stable

@ishaan-jaff ishaan-jaff merged commit 16f7bfd into BerriAI:main May 31, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request high priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: Add OIDC test for Circle CI -> Amazon Bedrock
3 participants