fix: bedrock set model and other fixes (#641)

This commit is contained in:
Ralph Khreish
2025-06-02 14:44:35 +02:00
committed by GitHub
parent e0438c8fb8
commit ad612763ff
21 changed files with 128 additions and 84 deletions

View File

@@ -482,6 +482,11 @@ async function setModel(role, modelId, options = {}) {
`Model ID "${modelId}" not found in the Ollama instance. Please verify the model is pulled and available. You can check available models with: curl ${tagsUrl}`
);
}
} else if (providerHint === 'bedrock') {
// Set provider without model validation since Bedrock models are managed by AWS
determinedProvider = 'bedrock';
warningMessage = `Warning: Custom Bedrock model '${modelId}' set. Please ensure the model ID is valid and accessible in your AWS account.`;
report('warn', warningMessage);
} else {
// Invalid provider hint - should not happen
throw new Error(`Invalid provider hint received: ${providerHint}`);