Files
coder/coderd/x
Seth ShelnuttandCian Johnston faa9815cd6 feat: configure Claude Platform for AWS on Anthropic providers (#29049)
This PR adds configuration plumbing for Claude Platform on AWS

## Summary

Makes Claude Platform for AWS configurable as a settings variant of
`type=anthropic`, discriminated by `_type: "claude_platform_aws"`.
Settings contain only `region` and `workspace_id`, plus the schema
version. No new provider type or database enum is introduced.

The API persists and projects those settings to the gateway. Provider
keys can be added or removed independently: allowed BYOK takes
precedence, followed by stored keys, then ambient SigV4 when neither key
source applies. Model-availability hints and keyless provider
construction reflect that ambient capability. Rejected or exhausted keys
do not fall back to IAM.

Removes Claude Platform-specific AWS identity fields, secret
redaction/merge behavior, external-ID handling, and mode/key consistency
checks. Bedrock configuration remains intact. Environment-based provider
seeding was removed upstream and is not restored. The Claude Platform
form and Experimental label remain follow-up work in #29050.

## Authentication limitation

Each Claude Platform provider uses either the gateway's ambient AWS
credentials when no provider keys are stored, or its stored API-key
pool. In either case, a client credential takes precedence when BYOK is
enabled. Rejected BYOK or an exhausted provider key pool does not fall
back to ambient IAM.

There is no per-provider AWS identity selection: keyless providers on
the same gateway share its ambient AWS credential chain and cannot
configure separate AWS access keys or assumed roles. Each provider still
has its own Claude Platform workspace ID and separate provider
attribution in Coder's usage/cost records; this does not imply separate
AWS billing accounts.

## Validation

- Race tests passed for SDK, daemon projection, db2sdk, chatprovider,
and targeted CLI/API configuration tests.
- Installed pre-commit hook passed, including generation, frontend/Go
lint, and build.
- Tests cover settings round trips, validation, adding/removing the last
key without settings changes, keyless construction, model availability,
and Bedrock regressions.

Generated by Coder Agents on behalf of @johnstcn and @Shelnutt2

Co-authored-by: Cian Johnston <cian@coder.com>
2026-09-29 09:20:31 +01:00
..