Skip to content

Commit 9c6a9fc

Browse files
committed
Fixed types being moved and me breaking the merge.
1 parent 64ed1e0 commit 9c6a9fc

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

packages/types/src/provider-settings.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff 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

105106
const 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",

src/api/providers/bedrock.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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
/************************************************************************************

0 commit comments

Comments
 (0)