feat(inference): add anthropic-aws (Claude Platform on AWS) backend#18
Merged
Conversation
Adds a third FAB_INFERENCE backend, anthropic-aws, alongside api and
bedrock. Claude Platform on AWS (GA 2026-05-11) is Anthropic's first-party
Claude API reached through the adopter's AWS account — IAM/SigV4 auth, AWS
Marketplace billing — with the same canonical model ids as the api path.
- src/inference.ts — extends the InferenceBackend union + the resolver set +
the error string. inferenceEnv('anthropic-aws') returns
CLAUDE_CODE_USE_ANTHROPIC_AWS=1 + the required ANTHROPIC_AWS_WORKSPACE_ID
(read from the env), and fails fast if it's missing or if
CLAUDE_CODE_USE_BEDROCK / _FOUNDRY is set (those take precedence in Claude
Code's provider routing, so silently inferring against the wrong backend is
prevented). resolveModelId is unchanged — non-bedrock backends already pass
canonical ids through.
- src/runtimes/sdk-k8s.ts — forwards ANTHROPIC_AWS_WORKSPACE_ID onto the
session pod so the isolated sdk-k8s loop inherits it.
- docs/transports.md — backend row + example + the opt-in/compliance caveat:
inference runs on Anthropic infra outside the AWS security boundary, so it
is not FedRAMP/IL/HIPAA-ready and stays opt-in per intake; Bedrock remains
the regulated path.
Read only by the in-process sdk runtime, so managed-agents / claude-cli are
unaffected. Verified: typecheck, vitest (267), build, prettier all green.
0be780c to
640228a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A third
FAB_INFERENCEbackend —anthropic-aws— alongsideapiandbedrock. Claude Platform on AWS (GA 2026-05-11) is Anthropic's first-party Claude API reached through the adopter's AWS account (IAM/SigV4 auth, AWS Marketplace billing), with the same canonical model ids as theapipath. This is the clean, high-value seam surfaced by thestxkxs/claudiumassessment: in-account first-party Claude, delivered through fab's existing orthogonal inference axis.Changes
src/inference.ts— extends theInferenceBackendunion + resolver set + error string.inferenceEnv('anthropic-aws')returnsCLAUDE_CODE_USE_ANTHROPIC_AWS=1+ the requiredANTHROPIC_AWS_WORKSPACE_ID, and fails fast if it's missing or ifCLAUDE_CODE_USE_BEDROCK/_FOUNDRYis set (those take precedence in Claude Code routing — silently inferring against the wrong backend is prevented).resolveModelIdunchanged (non-bedrock backends already pass canonical ids through).src/runtimes/sdk-k8s.ts— forwardsANTHROPIC_AWS_WORKSPACE_IDonto the session pod.docs/transports.md— backend row + example + compliance caveat (runs on Anthropic infra outside the AWS boundary → not FedRAMP/IL/HIPAA-ready, opt-in per intake; Bedrock stays the regulated path).Read only by the in-process
sdkruntime;managed-agents/claude-cliunaffected.Verification
npm run lint(tsc + eslint),npm test(267 pass, +6 new),npm run build,npm run format:check— all green.