chore: cleanup and format and small refactor
This commit is contained in:
@@ -497,9 +497,13 @@ function getParametersForRole(role, explicitRoot = null) {
|
|||||||
function isApiKeySet(providerName, session = null, projectRoot = null) {
|
function isApiKeySet(providerName, session = null, projectRoot = null) {
|
||||||
// Define the expected environment variable name for each provider
|
// 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"
|
return true; // Indicate key status is effectively "OK"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,14 +4,14 @@
|
|||||||
"id": "us.anthropic.claude-3-7-sonnet-20250219-v1:0",
|
"id": "us.anthropic.claude-3-7-sonnet-20250219-v1:0",
|
||||||
"swe_score": 0.623,
|
"swe_score": 0.623,
|
||||||
"cost_per_1m_tokens": { "input": 3, "output": 15 },
|
"cost_per_1m_tokens": { "input": 3, "output": 15 },
|
||||||
"allowed_roles": [ "main", "fallback" ],
|
"allowed_roles": ["main", "fallback"],
|
||||||
"max_tokens": 65536
|
"max_tokens": 65536
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "us.deepseek.r1-v1:0",
|
"id": "us.deepseek.r1-v1:0",
|
||||||
"swe_score": 0,
|
"swe_score": 0,
|
||||||
"cost_per_1m_tokens": { "input": 1.35, "output": 5.4 },
|
"cost_per_1m_tokens": { "input": 1.35, "output": 5.4 },
|
||||||
"allowed_roles": [ "research" ],
|
"allowed_roles": ["research"],
|
||||||
"max_tokens": 65536
|
"max_tokens": 65536
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ export class BedrockAIProvider extends BaseAIProvider {
|
|||||||
const credentialProvider = fromNodeProviderChain();
|
const credentialProvider = fromNodeProviderChain();
|
||||||
|
|
||||||
return createAmazonBedrock({
|
return createAmazonBedrock({
|
||||||
credentialProvider,
|
credentialProvider
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.handleError('client initialization', error);
|
this.handleError('client initialization', error);
|
||||||
|
|||||||
Reference in New Issue
Block a user