Skip to content

[FEAT] Add full Claude Platform on AWS support #106

@777genius

Description

@777genius

Summary

Claude Platform on AWS is not fully supported today. We currently support Amazon Bedrock via Claude Code's existing Bedrock path, for example:

CLAUDE_CODE_USE_BEDROCK=1, AWS_PROFILE, AWS_REGION, and optional awsAuthRefresh such as aws sso login --profile cc.

That is a separate integration from Claude Platform on AWS. Claude Platform on AWS uses the Anthropic AWS gateway, ANTHROPIC_AWS_WORKSPACE_ID, AWS SigV4 or ANTHROPIC_AWS_API_KEY, and the official platform-specific SDK client.

Docs:

Current status

  • Amazon Bedrock should remain supported through the existing CLAUDE_CODE_USE_BEDROCK backend.
  • Claude Platform on AWS should be treated as not fully supported until this issue is implemented.
  • Do not route Claude Platform on AWS through first-party Anthropic OAuth/API-key auth.
  • Do not infer Claude Platform on AWS from AWS_PROFILE or AWS_REGION alone. The explicit signal should be ANTHROPIC_AWS_WORKSPACE_ID.

Required implementation approach

Please implement the architectural option, not the quick transport-only patch.

Add a first-class internal runtime backend identity for Claude Platform on AWS, for example claude-platform-aws, and audit all places that currently treat firstParty as both model-ID format and auth/endpoint transport.

Important distinction:

  • Claude Platform on AWS uses first-party Anthropic model IDs, not Bedrock model IDs.
  • But it does not use first-party Anthropic auth or endpoint behavior.

Expected changes

  • Add explicit backend/provider handling for claude-platform-aws without breaking existing bedrock, vertex, foundry, first-party Anthropic, Codex, Gemini, or OpenCode paths.
  • Use the official @anthropic-ai/aws-sdk / AnthropicAws client only after checking the current stable package version and compatibility.
  • Keep Bedrock priority higher when both CLAUDE_CODE_USE_BEDROCK and ANTHROPIC_AWS_WORKSPACE_ID are present.
  • Require ANTHROPIC_AWS_WORKSPACE_ID as the explicit signal for Claude Platform on AWS.
  • Require AWS_REGION or AWS_DEFAULT_REGION; show a clear non-ready status when missing.
  • Support AWS SigV4 through the standard AWS credential chain, including AWS SSO and named profiles.
  • Respect existing awsAuthRefresh behavior where appropriate, such as aws sso login --profile cc.
  • Support ANTHROPIC_AWS_API_KEY as the alternate auth path.
  • Ensure runtime status/preflight does not show Connect Anthropic for Claude Platform on AWS.
  • Ensure runtime status only becomes ready when the actual request transport is wired and validated.
  • Ensure first-party Anthropic OAuth/API key headers are not mixed into Claude Platform on AWS requests.
  • Audit model catalog, model availability, beta/tool capability checks, settings sync, auth checks, telemetry/provider labels, and any getAPIProvider() === 'firstParty' branches.
  • Keep host-managed env filtering scoped: allow Claude Platform on AWS env only for Anthropic/Claude Platform launches, not Codex/Gemini routing.

Tests to add

  • Bedrock remains selected when CLAUDE_CODE_USE_BEDROCK=1 and ANTHROPIC_AWS_WORKSPACE_ID are both present.
  • AWS_PROFILE and AWS_REGION alone do not select Claude Platform on AWS.
  • ANTHROPIC_AWS_WORKSPACE_ID selects Claude Platform on AWS only for Anthropic-compatible launches.
  • Codex/Gemini launches are not redirected by Claude Platform on AWS env vars.
  • Missing region produces a non-ready status with a clear message.
  • Runtime status does not offer Connect Anthropic for Claude Platform on AWS.
  • Request client uses AnthropicAws for Claude Platform on AWS and does not include first-party Anthropic OAuth/API-key auth headers.
  • AWS SSO/profile flow works with existing awsAuthRefresh assumptions.
  • ANTHROPIC_AWS_API_KEY path is covered separately from SigV4.
  • Model IDs remain first-party format and do not use Bedrock prefixes.

Non-goals

  • Do not change the existing Bedrock implementation except where tests are needed to prove priority and non-regression.
  • Do not use AWS_PROFILE or AWS_REGION as a backend selection signal by themselves.
  • Do not silently mark Claude Platform on AWS as authenticated/ready before real request transport support exists.

Risk notes

This should not be implemented as a small one-off branch in the API client only. The risky part is that many existing checks use firstParty to mean both model ID format and first-party Anthropic auth/endpoint behavior. Claude Platform on AWS shares the model ID format, but not the auth/endpoint behavior.

Preferred reliability target: implement this as the larger architectural pass with focused tests across runtime status, env filtering, provider selection, auth, and request client behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions