Updating Roo-Cline with the latest cline/cline

This commit is contained in:
John Stearns
2024-11-07 15:25:10 -08:00
parent cfed4ce8a1
commit c6c0099942
10 changed files with 144 additions and 27 deletions

View File

@@ -25,8 +25,28 @@ export class AwsBedrockHandler implements ApiHandler {
}
async *createMessage(systemPrompt: string, messages: Anthropic.Messages.MessageParam[]): ApiStream {
// cross region inference requires prefixing the model id with the region
let modelId: string
if (this.options.awsUseCrossRegionInference) {
let regionPrefix = (this.options.awsRegion || "").slice(0, 3)
switch (regionPrefix) {
case "us-":
modelId = `us.${this.getModel().id}`
break
case "eu-":
modelId = `eu.${this.getModel().id}`
break
default:
// cross region inference is not supported in this region, falling back to default model
modelId = this.getModel().id
break
}
} else {
modelId = this.getModel().id
}
const stream = await this.client.messages.create({
model: this.getModel().id,
model: modelId,
max_tokens: this.getModel().info.maxTokens || 8192,
temperature: 0,
system: systemPrompt,