mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 15:03:31 +00:00
Adds support for Amazon Bedrock with Claude models including: - Full streaming support via Converse API - Reasoning/thinking support for Claude models - Cross-region inference model ID handling - Multiple AWS credential sources (profile, IAM keys, API keys) - Image support in messages and tool results - Unicode surrogate sanitization Also adds 'Adding a New Provider' documentation to AGENTS.md and README. Co-authored-by: nickchan2 <nickchan2@users.noreply.github.com>
18 lines
552 B
TypeScript
18 lines
552 B
TypeScript
/**
|
|
* Utility functions for Amazon Bedrock tests
|
|
*/
|
|
|
|
/**
|
|
* Check if any valid AWS credentials are configured for Bedrock.
|
|
* Returns true if any of the following are set:
|
|
* - AWS_PROFILE (named profile from ~/.aws/credentials)
|
|
* - AWS_ACCESS_KEY_ID + AWS_SECRET_ACCESS_KEY (IAM keys)
|
|
* - AWS_BEARER_TOKEN_BEDROCK (Bedrock API key)
|
|
*/
|
|
export function hasBedrockCredentials(): boolean {
|
|
return !!(
|
|
process.env.AWS_PROFILE ||
|
|
(process.env.AWS_ACCESS_KEY_ID && process.env.AWS_SECRET_ACCESS_KEY) ||
|
|
process.env.AWS_BEARER_TOKEN_BEDROCK
|
|
);
|
|
}
|