flowchart TD
%% Main Entry Point and Initialization
Start([Application Start]) --> ParseArgs[Parse Command Line Arguments]
ParseArgs --> CheckStdin{Check stdin}
CheckStdin -->|Input Piped| ProcessPiped[Process Piped Input]
CheckStdin -->|Interactive Mode| CheckAuth{Authentication Status}
%% Authentication Flow
CheckAuth -->|Not Authenticated| OAuthFlow[OAuth Authentication]
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
var c9 = !!process.env.CLAUDE_CODE_USE_BEDROCK, | |
p9 = !!process.env.CLAUDE_CODE_USE_VERTEX, | |
Tl1 = { | |
bedrock: 'us.anthropic.claude-3-7-sonnet-20250219-v1:0', | |
vertex: 'claude-3-7-sonnet@20250219', | |
firstParty: 'claude-3-7-sonnet-20250219', | |
}, | |
PB = c9 | |
? 'us.anthropic.claude-3-5-haiku-20241022-v1:0' | |
: p9 |
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
import boto3 | |
import json | |
client = boto3.client('bedrock-runtime', region_name='us-east-1') | |
response = client.invoke_model( | |
modelId='us.anthropic.claude-3-7-sonnet-2025-0219-v1:0', | |
body=json.dumps({ | |
"anthropic_version": "bedrock-2023-05-31", | |
"messages": [ |
OlderNewer