Skip to content

feat: add AWS PRM user-agent attribution for Bedrock calls#224

Open
blinkagent[bot] wants to merge 1 commit intomainfrom
feat/aws-prm-user-agent
Open

feat: add AWS PRM user-agent attribution for Bedrock calls#224
blinkagent[bot] wants to merge 1 commit intomainfrom
feat/aws-prm-user-agent

Conversation

@blinkagent
Copy link

@blinkagent blinkagent bot commented Mar 19, 2026

Adds config.WithAppID to the AWS SDK config used for Bedrock API calls, setting the AWS Partner Revenue Measurement (PRM) user-agent attribution on every Bedrock request.

This is the AI Bridge counterpart to coder/coder#23138, which covers the Terraform provisioner path. Together, they ensure all AWS API calls made by Coder — both workspace infrastructure (Terraform) and LLM inference (Bedrock) — include PRM attribution in the user-agent header.

How it works

  • withAWSBedrockOptions() now passes config.WithAppID("APN_1.1/pc_cdfmjwn8i6u8l9fwz8h82e4w3$") to config.LoadDefaultConfig
  • The AWS SDK appends this to the user-agent header on every Bedrock API call
  • Only affects Bedrock calls — OpenAI and direct Anthropic API calls are unaffected (they don't use the AWS SDK)

Notes

  • Same obfuscation consideration as the coder/coder PR — the product code is hardcoded in source. It may be worth injecting via -ldflags -X at build time, though it is a public identifier on the AWS Marketplace listing.

References

@blinkagent blinkagent bot force-pushed the feat/aws-prm-user-agent branch from 4a33e1e to f83daa9 Compare March 19, 2026 15:59
@DevelopmentCats DevelopmentCats self-assigned this Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant