Skip to content

Commit 2529892

Browse files
Merge branch 'watsonx-ai-integration' of https://github.com/PrasangAPrajapati/Roo-Code into watsonx-ai-integration
2 parents e316c89 + f43b197 commit 2529892

File tree

19 files changed

+110
-38
lines changed

19 files changed

+110
-38
lines changed

apps/web-roo-code/src/app/privacy/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ export default function Privacy() {
8686
Your source code does not transit Roo Code servers unless you explicitly choose Roo Code
8787
as a model provider (proxy mode).
8888
</strong>{" "}
89-
When Roo Code Cloud is your model provider, your code briefly transits Roo Code servers only to
90-
forward it to the upstream model, is not stored, and is deleted immediately after
89+
When Roo Code Cloud is your model provider, your code briefly transits Roo Code servers only
90+
to forward it to the upstream model, is not stored, and is deleted immediately after
9191
forwarding. Otherwise, your code is sent <strong>directly</strong>—via client‑to‑provider
9292
TLS—to the model you select. Roo Code never stores, inspects, or trains on your code.
9393
</li>

packages/types/src/global-settings.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,9 @@ export const SECRET_STATE_KEYS = [
199199
"codebaseIndexMistralApiKey",
200200
"codebaseIndexVercelAiGatewayApiKey",
201201
"huggingFaceApiKey",
202+
"watsonxApiKey",
203+
"codebaseIndexWatsonxApiKey",
204+
"codebaseIndexWatsonxProjectId",
202205
"sambaNovaApiKey",
203206
"zaiApiKey",
204207
"fireworksApiKey",

packages/types/src/provider-settings.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ export const providerNames = [
6060
"chutes",
6161
"litellm",
6262
"huggingface",
63+
"watsonx",
6364
"cerebras",
6465
"sambanova",
6566
"zai",
@@ -388,6 +389,7 @@ export const providerSettingsSchemaDiscriminated = z.discriminatedUnion("apiProv
388389
huggingFaceSchema.merge(z.object({ apiProvider: z.literal("huggingface") })),
389390
chutesSchema.merge(z.object({ apiProvider: z.literal("chutes") })),
390391
litellmSchema.merge(z.object({ apiProvider: z.literal("litellm") })),
392+
watsonxSchema.merge(z.object({ apiProvider: z.literal("watsonx") })),
391393
cerebrasSchema.merge(z.object({ apiProvider: z.literal("cerebras") })),
392394
sambaNovaSchema.merge(z.object({ apiProvider: z.literal("sambanova") })),
393395
zaiSchema.merge(z.object({ apiProvider: z.literal("zai") })),

pnpm-lock.yaml

Lines changed: 50 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/api/providers/featherless.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
import { DEEP_SEEK_DEFAULT_TEMPERATURE, type FeatherlessModelId, featherlessDefaultModelId, featherlessModels } from "@roo-code/types"
1+
import {
2+
DEEP_SEEK_DEFAULT_TEMPERATURE,
3+
type FeatherlessModelId,
4+
featherlessDefaultModelId,
5+
featherlessModels,
6+
} from "@roo-code/types"
27
import { Anthropic } from "@anthropic-ai/sdk"
38
import OpenAI from "openai"
49

src/api/providers/fetchers/modelCache.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import { getLMStudioModels } from "./lmstudio"
2121
import { getIOIntelligenceModels } from "./io-intelligence"
2222
import { getDeepInfraModels } from "./deepinfra"
2323
import { getWatsonxModels } from "./watsonx"
24-
2524
const memoryCache = new NodeCache({ stdTTL: 5 * 60, checkperiod: 5 * 60 })
2625

2726
async function writeModels(router: RouterName, data: ModelRecord) {

src/api/providers/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ export { UnboundHandler } from "./unbound"
2828
export { VertexHandler } from "./vertex"
2929
export { VsCodeLmHandler } from "./vscode-lm"
3030
export { XAIHandler } from "./xai"
31+
export { WatsonxAIHandler } from "./watsonx"
3132
export { ZAiHandler } from "./zai"
3233
export { FireworksHandler } from "./fireworks"
3334
export { RooHandler } from "./roo"

src/core/tools/codebaseSearchTool.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export async function codebaseSearchTool(
1717
removeClosingTag: RemoveClosingTag,
1818
) {
1919
const toolName = "codebase_search"
20-
const workspacePath = (cline.cwd && cline.cwd.trim() !== '') ? cline.cwd : getWorkspacePath()
20+
const workspacePath = cline.cwd && cline.cwd.trim() !== "" ? cline.cwd : getWorkspacePath()
2121

2222
if (!workspacePath) {
2323
// This case should ideally not happen if Cline is initialized correctly

src/core/webview/webviewMessageHandler.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
type ClineMessage,
1212
type TelemetrySetting,
1313
TelemetryEventName,
14-
UserSettingsConfig
14+
UserSettingsConfig,
1515
} from "@roo-code/types"
1616
import { CloudService } from "@roo-code/cloud"
1717
import { TelemetryService } from "@roo-code/telemetry"
@@ -2545,7 +2545,6 @@ export const webviewMessageHandler = async (
25452545
settings.codebaseIndexVercelAiGatewayApiKey,
25462546
)
25472547
}
2548-
25492548
if (settings.codebaseIndexWatsonxApiKey !== undefined) {
25502549
await provider.contextProxy.storeSecret(
25512550
"codebaseIndexWatsonxApiKey",
@@ -2558,7 +2557,6 @@ export const webviewMessageHandler = async (
25582557
settings.codebaseIndexWatsonxProjectId,
25592558
)
25602559
}
2561-
25622560
// Send success response first - settings are saved regardless of validation
25632561
await provider.postMessageToWebview({
25642562
type: "codeIndexSettingsSaved",

src/i18n/locales/en/embeddings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
"openAiCompatibleConfigMissing": "OpenAI Compatible configuration missing for embedder creation",
4848
"geminiConfigMissing": "Gemini configuration missing for embedder creation",
4949
"mistralConfigMissing": "Mistral configuration missing for embedder creation",
50+
"watsonxConfigMissing": "IBM watsonx configuration missing for embedder creation",
5051
"vercelAiGatewayConfigMissing": "Vercel AI Gateway configuration missing for embedder creation",
5152
"watsonxConfigMissing": "IBM watsonx configuration missing for embedder creation",
5253
"invalidEmbedderType": "Invalid embedder type configured: {{embedderProvider}}",

0 commit comments

Comments
 (0)