Skip to content

Commit 69c3670

Browse files
fix region and fix test for cloudpak
1 parent df04f67 commit 69c3670

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

packages/types/src/providers/ibm-watsonx.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import type { ModelInfo } from "../model.js"
22

33
export const REGION_TO_URL: Record<string, string> = {
4-
"us-south": "https://us-south.ml.cloud.ibm.com",
5-
"eu-de": "https://eu-de.ml.cloud.ibm.com",
6-
"eu-gb": "https://eu-gb.ml.cloud.ibm.com",
7-
"jp-tok": "https://jp-tok.ml.cloud.ibm.com",
8-
"au-syd": "https://au-syd.ml.cloud.ibm.com",
9-
"ca-tor": "https://ca-tor.ml.cloud.ibm.com",
10-
"ap-south-1": "https://ap-south-1.aws.wxai.ibm.com",
4+
Dallas: "https://us-south.ml.cloud.ibm.com",
5+
Frankfurt: "https://eu-de.ml.cloud.ibm.com",
6+
London: "https://eu-gb.ml.cloud.ibm.com",
7+
Tokyo: "https://jp-tok.ml.cloud.ibm.com",
8+
Sydney: "https://au-syd.ml.cloud.ibm.com",
9+
Toronto: "https://ca-tor.ml.cloud.ibm.com",
10+
Mumbai: "https://ap-south-1.aws.wxai.ibm.com",
1111
}
1212

1313
/**
@@ -26,7 +26,7 @@ export const watsonxDefaultModelId = "ibm/granite-3-3-8b-instruct"
2626
// Common model properties
2727
export const baseModelInfo: ModelInfo = {
2828
maxTokens: 8192,
29-
contextWindow: 131072,
29+
contextWindow: 128000,
3030
supportsImages: false,
3131
supportsPromptCache: false,
3232
}

src/api/providers/__tests__/ibm-watsonx.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ describe("WatsonxAIHandler", () => {
108108
...mockOptions,
109109
watsonxPlatform: "cloudPak",
110110
watsonxUsername: "test-username",
111-
watsonxAuthType: "basic",
111+
watsonxAuthType: "password",
112112
}
113113

114114
expect(() => new WatsonxAIHandler(invalidOptions)).toThrow(

src/api/providers/fetchers/ibm-watsonx.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export async function getWatsonxModels(
9999
continue
100100
}
101101

102-
const contextWindow = model.model_limits?.max_sequence_length || 131072
102+
const contextWindow = model.model_limits?.max_sequence_length || 128000
103103
const maxTokens =
104104
model.training_parameters?.max_output_tokens?.max || Math.floor(contextWindow / 16)
105105
const description = model.long_description || model.short_description || ""
@@ -108,6 +108,7 @@ export async function getWatsonxModels(
108108
contextWindow,
109109
maxTokens,
110110
supportsPromptCache: false,
111+
supportsImages: false,
111112
description,
112113
}
113114
}

0 commit comments

Comments
 (0)