File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,7 @@ const bedrockSchema = apiModelIdProviderModelSchema.extend({
100100 awsProfile : z . string ( ) . optional ( ) ,
101101 awsUseProfile : z . boolean ( ) . optional ( ) ,
102102 awsCustomArn : z . string ( ) . optional ( ) ,
103+ awsModelContextWindow : z . number ( ) . optional ( ) ,
103104} )
104105
105106const vertexSchema = apiModelIdProviderModelSchema . extend ( {
@@ -283,6 +284,7 @@ export const PROVIDER_SETTINGS_KEYS = keysOf<ProviderSettings>()([
283284 "awsProfile" ,
284285 "awsUseProfile" ,
285286 "awsCustomArn" ,
287+ "awsModelContextWindow" ,
286288 // Google Vertex
287289 "vertexKeyFile" ,
288290 "vertexJsonCredentials" ,
Original file line number Diff line number Diff line change @@ -191,9 +191,9 @@ export class AwsBedrockHandler extends BaseProvider implements SingleCompletionH
191191 }
192192
193193 // PATCH: Helper to guess model info from custom modelId string if not in bedrockModels
194- private guessModelInfoFromId ( modelId : string ) : Partial < SharedModelInfo > {
194+ private guessModelInfoFromId ( modelId : string ) : Partial < ModelInfo > {
195195 // Define a mapping for model ID patterns and their configurations
196- const modelConfigMap : Record < string , Partial < SharedModelInfo > > = {
196+ const modelConfigMap : Record < string , Partial < ModelInfo > > = {
197197 "claude-4" : {
198198 maxTokens : 8192 ,
199199 contextWindow : 200_000 ,
@@ -751,7 +751,7 @@ export class AwsBedrockHandler extends BaseProvider implements SingleCompletionH
751751 }
752752
753753 // PATCH: Don't override maxTokens/contextWindow here; handled in getModelById (and includes user overrides)
754- return modelConfig as { id : BedrockModelId | string ; info : SharedModelInfo }
754+ return modelConfig as { id : BedrockModelId | string ; info : ModelInfo }
755755 }
756756
757757 /************************************************************************************
You can’t perform that action at this time.
0 commit comments