chore: cleanup and format and small refactor

This commit is contained in:
Ralph Khreish
2025-06-20 16:03:48 +03:00
parent 9d431b4b03
commit 30eac026c2
3 changed files with 9 additions and 5 deletions

View File

@@ -497,9 +497,13 @@ function getParametersForRole(role, explicitRoot = null) {
function isApiKeySet(providerName, session = null, projectRoot = null) {
// Define the expected environment variable name for each provider
const okKeys = ['ollama', 'bedrock'];
// Providers that don't require API keys for authentication
const providersWithoutApiKeys = [
CUSTOM_PROVIDERS.OLLAMA,
CUSTOM_PROVIDERS.BEDROCK
];
if (okKeys.includes(providerName?.toLowerCase())) {
if (providersWithoutApiKeys.includes(providerName?.toLowerCase())) {
return true; // Indicate key status is effectively "OK"
}

View File

@@ -4,14 +4,14 @@
"id": "us.anthropic.claude-3-7-sonnet-20250219-v1:0",
"swe_score": 0.623,
"cost_per_1m_tokens": { "input": 3, "output": 15 },
"allowed_roles": [ "main", "fallback" ],
"allowed_roles": ["main", "fallback"],
"max_tokens": 65536
},
{
"id": "us.deepseek.r1-v1:0",
"swe_score": 0,
"cost_per_1m_tokens": { "input": 1.35, "output": 5.4 },
"allowed_roles": [ "research" ],
"allowed_roles": ["research"],
"max_tokens": 65536
}
],

View File

@@ -24,7 +24,7 @@ export class BedrockAIProvider extends BaseAIProvider {
const credentialProvider = fromNodeProviderChain();
return createAmazonBedrock({
credentialProvider,
credentialProvider
});
} catch (error) {
this.handleError('client initialization', error);