Compare commits

...
Author SHA1 Message Date
nighttrek 0451e416d4 added bedrock changes 2025-02-24 11:19:20 -08:00
nighttrek 4d3d9f4284 added amazon nova models to the bedrock provider 2025-02-20 23:19:16 -08:00
2 changed files with 42 additions and 0 deletions
+18
View File
@@ -21,6 +21,24 @@ export class AwsBedrockHandler implements ApiHandler {
// initialization, and allowing for session renewal if necessary as well
let client = await this.getClient()
const request: {
model: string
max_tokens?: number
temperature: number
system: string
messages: Anthropic.Messages.MessageParam[]
stream: boolean
} = {
model: modelId,
temperature: 0,
system: systemPrompt,
messages,
stream: true,
}
console.log("TESTING MODEL ID STARTS WITH TEST " + this.getModel().id)
if (!this.getModel().id.startsWith("amazon.")) {
request.max_tokens = this.getModel().info.maxTokens || 8192
}
const stream = await client.messages.create({
model: modelId,
max_tokens: this.getModel().info.maxTokens || 8192,
+24
View File
@@ -130,6 +130,30 @@ export const anthropicModels = {
export type BedrockModelId = keyof typeof bedrockModels
export const bedrockDefaultModelId: BedrockModelId = "anthropic.claude-3-5-sonnet-20241022-v2:0"
export const bedrockModels = {
"amazon.nova-pro-v1:0": {
maxTokens: 8192,
contextWindow: 300_000,
supportsImages: true,
supportsPromptCache: false,
inputPrice: 0.8,
outputPrice: 3.2,
},
"amazon.nova-lite-v1:0": {
maxTokens: 8192,
contextWindow: 300_000,
supportsImages: true,
supportsPromptCache: false,
inputPrice: 0.06,
outputPrice: 0.24,
},
"amazon.nova-micro-v1:0": {
maxTokens: 8192,
contextWindow: 128_000,
supportsImages: false,
supportsPromptCache: false,
inputPrice: 0.035,
outputPrice: 0.14,
},
"anthropic.claude-3-5-sonnet-20241022-v2:0": {
maxTokens: 8192,
contextWindow: 200_000,