Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
2b9cc51
Add IBM watsonx AI provider in the list of AI providers
PrasangAPrajapati Sep 25, 2025
a185820
Update webview-ui/src/i18n/locales/es/settings.json
PrasangAPrajapati Sep 25, 2025
4af2f1b
Update webview-ui/src/components/settings/providers/ibm-watsonx.tsx
PrasangAPrajapati Sep 25, 2025
c28dd6d
Update webview-ui/src/i18n/locales/fr/settings.json
PrasangAPrajapati Sep 25, 2025
a0c38b0
Update webview-ui/src/i18n/locales/zh-TW/settings.json
PrasangAPrajapati Sep 25, 2025
9d146dc
Update webview-ui/src/i18n/locales/tr/settings.json
PrasangAPrajapati Sep 25, 2025
821f818
remove double project ID validation
PrasangAPrajapati Sep 25, 2025
d9f8e51
address roomote feedback and translation of strings for all locales
PrasangAPrajapati Sep 26, 2025
607da8e
fix model options parameterds
PrasangAPrajapati Sep 26, 2025
a28d1ab
update if condition for platform validation and update apikey casing..
PrasangAPrajapati Oct 2, 2025
f102a03
add watsonxPassword to the SECRET_KEYS
PrasangAPrajapati Oct 2, 2025
32636cb
Adjust diff description and send values to the post message
PrasangAPrajapati Oct 2, 2025
791d098
add localized string errors and placeholders, refresh models when clo…
PrasangAPrajapati Oct 2, 2025
440ee20
add missing polish translations for watsonx
PrasangAPrajapati Oct 2, 2025
1a0a8ce
localize labels and few minor fixes
PrasangAPrajapati Oct 2, 2025
11090ca
Update webview-ui/src/components/settings/providers/ibm-watsonx.tsx
PrasangAPrajapati Oct 2, 2025
b4058ed
common region-to-url function and localize more strings
PrasangAPrajapati Oct 3, 2025
962a7cb
Update webview-ui/src/components/settings/providers/ibm-watsonx.tsx
PrasangAPrajapati Oct 3, 2025
26e7aa7
post message requestWatsonxModels by checking condition
PrasangAPrajapati Oct 3, 2025
3cc95c1
update feedback from roomote
PrasangAPrajapati Oct 6, 2025
f34d191
remove REGION_TO_URL duplication and fix event handler
PrasangAPrajapati Oct 7, 2025
59b1de9
refactor: reduce IBM watsonx provider bloat and improve code quality
daniel-lxs Oct 24, 2025
df04f67
fix: remove unrelated IBM watsonx special case from diff settings
daniel-lxs Oct 24, 2025
69c3670
fix region and fix test for cloudpak
PrasangAPrajapati Oct 24, 2025
8839606
Add IBM watsonx AI provider in the list of AI providers
PrasangAPrajapati Sep 25, 2025
98875e3
address roomote feedback and translation of strings for all locales
PrasangAPrajapati Sep 26, 2025
6ebad08
feat: convert Chutes to dynamic/router provider (#8980)
roomote[bot] Nov 2, 2025
8224ed3
Add IBM watsonx AI provider in the list of AI providers
PrasangAPrajapati Sep 25, 2025
87d55a3
feat: convert Chutes to dynamic/router provider (#8980)
roomote[bot] Nov 2, 2025
e7bc8c1
Add IBM watsonx AI provider in the list of AI providers
PrasangAPrajapati Sep 25, 2025
fff078a
feat: convert Chutes to dynamic/router provider (#8980)
roomote[bot] Nov 2, 2025
a1221b1
fix chutes provider
PrasangAPrajapati Nov 3, 2025
f7d307d
revert diff settings to original
PrasangAPrajapati Nov 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/types/src/global-settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,8 @@ export const SECRET_STATE_KEYS = [
"featherlessApiKey",
"ioIntelligenceApiKey",
"vercelAiGatewayApiKey",
"watsonxApiKey",
"watsonxPassword",
] as const

// Global secrets that are part of GlobalSettings (not ProviderSettings)
Expand Down
18 changes: 18 additions & 0 deletions packages/types/src/provider-settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export const dynamicProviders = [
"glama",
"roo",
"chutes",
"ibm-watsonx",
] as const

export type DynamicProvider = (typeof dynamicProviders)[number]
Expand Down Expand Up @@ -420,6 +421,18 @@ const vercelAiGatewaySchema = baseProviderSettingsSchema.extend({
vercelAiGatewayModelId: z.string().optional(),
})

const watsonxSchema = baseProviderSettingsSchema.extend({
watsonxPlatform: z.string().optional(),
watsonxBaseUrl: z.string().optional(),
watsonxApiKey: z.string().optional(),
watsonxProjectId: z.string().optional(),
watsonxModelId: z.string().optional(),
watsonxUsername: z.string().optional(),
watsonxAuthType: z.string().optional(),
watsonxPassword: z.string().optional(),
watsonxRegion: z.string().optional(),
})

const defaultSchema = z.object({
apiProvider: z.undefined(),
})
Expand Down Expand Up @@ -462,6 +475,7 @@ export const providerSettingsSchemaDiscriminated = z.discriminatedUnion("apiProv
qwenCodeSchema.merge(z.object({ apiProvider: z.literal("qwen-code") })),
rooSchema.merge(z.object({ apiProvider: z.literal("roo") })),
vercelAiGatewaySchema.merge(z.object({ apiProvider: z.literal("vercel-ai-gateway") })),
watsonxSchema.merge(z.object({ apiProvider: z.literal("ibm-watsonx") })),
defaultSchema,
])

Expand Down Expand Up @@ -504,6 +518,7 @@ export const providerSettingsSchema = z.object({
...qwenCodeSchema.shape,
...rooSchema.shape,
...vercelAiGatewaySchema.shape,
...watsonxSchema.shape,
...codebaseIndexProviderSchema.shape,
})

Expand Down Expand Up @@ -538,6 +553,7 @@ export const modelIdKeys = [
"ioIntelligenceModelId",
"vercelAiGatewayModelId",
"deepInfraModelId",
"watsonxModelId",
] as const satisfies readonly (keyof ProviderSettings)[]

export type ModelIdKey = (typeof modelIdKeys)[number]
Expand Down Expand Up @@ -590,6 +606,7 @@ export const modelIdKeysByProvider: Record<TypicalProvider, ModelIdKey> = {
"io-intelligence": "ioIntelligenceModelId",
roo: "apiModelId",
"vercel-ai-gateway": "vercelAiGatewayModelId",
"ibm-watsonx": "watsonxModelId",
}

/**
Expand Down Expand Up @@ -722,6 +739,7 @@ export const MODELS_BY_PROVIDER: Record<
deepinfra: { id: "deepinfra", label: "DeepInfra", models: [] },
"vercel-ai-gateway": { id: "vercel-ai-gateway", label: "Vercel AI Gateway", models: [] },
chutes: { id: "chutes", label: "Chutes AI", models: [] },
"ibm-watsonx": { id: "ibm-watsonx", label: "IBM watsonx", models: [] },

// Local providers; models discovered from localhost endpoints.
lmstudio: { id: "lmstudio", label: "LM Studio", models: [] },
Expand Down
39 changes: 39 additions & 0 deletions packages/types/src/providers/ibm-watsonx.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import type { ModelInfo } from "../model.js"

export const REGION_TO_URL: Record<string, string> = {
Dallas: "https://us-south.ml.cloud.ibm.com",
Frankfurt: "https://eu-de.ml.cloud.ibm.com",
London: "https://eu-gb.ml.cloud.ibm.com",
Tokyo: "https://jp-tok.ml.cloud.ibm.com",
Sydney: "https://au-syd.ml.cloud.ibm.com",
Toronto: "https://ca-tor.ml.cloud.ibm.com",
Mumbai: "https://ap-south-1.aws.wxai.ibm.com",
}

/**
* Models that are not suitable for general text inference tasks.
* These are typically guard/safety models used for content moderation.
*/
export const WATSONX_NON_INFERENCE_MODELS = [
"meta-llama/llama-guard-3-11b-vision",
"ibm/granite-guardian-3-8b",
"ibm/granite-guardian-3-2b",
] as const

export type WatsonxAIModelId = keyof typeof watsonxModels
export const watsonxDefaultModelId = "ibm/granite-3-3-8b-instruct"

// Common model properties
export const baseModelInfo: ModelInfo = {
maxTokens: 8192,
contextWindow: 128000,
supportsImages: false,
supportsPromptCache: false,
}

export const watsonxModels = {
// IBM Granite model
"ibm/granite-3-3-8b-instruct": {
...baseModelInfo,
},
} as const satisfies Record<string, ModelInfo>
1 change: 1 addition & 0 deletions packages/types/src/providers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ export * from "./vercel-ai-gateway.js"
export * from "./zai.js"
export * from "./deepinfra.js"
export * from "./minimax.js"
export * from "./ibm-watsonx.js"
Loading