Skip to content

Commit 8119b11

Browse files
committed
Merge remote-tracking branch 'upstream/main' into feature/add-tars-as-provider
# Conflicts: # packages/types/src/provider-settings.ts
2 parents 07a7877 + fd3535c commit 8119b11

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+741
-66
lines changed

packages/types/src/provider-settings.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export const providerNames = [
4747
"zai",
4848
"fireworks",
4949
"io-intelligence",
50+
"roo",
5051
"tars",
5152
] as const
5253

@@ -294,6 +295,10 @@ const ioIntelligenceSchema = apiModelIdProviderModelSchema.extend({
294295
ioIntelligenceApiKey: z.string().optional(),
295296
})
296297

298+
const rooSchema = apiModelIdProviderModelSchema.extend({
299+
// No additional fields needed - uses cloud authentication
300+
})
301+
297302
const defaultSchema = z.object({
298303
apiProvider: z.undefined(),
299304
})
@@ -331,6 +336,8 @@ export const providerSettingsSchemaDiscriminated = z.discriminatedUnion("apiProv
331336
zaiSchema.merge(z.object({ apiProvider: z.literal("zai") })),
332337
fireworksSchema.merge(z.object({ apiProvider: z.literal("fireworks") })),
333338
ioIntelligenceSchema.merge(z.object({ apiProvider: z.literal("io-intelligence") })),
339+
rooSchema.merge(z.object({ apiProvider: z.literal("roo") })),
340+
tarsSchema.merge(z.object({ apiProvider: z.literal("tars") })),
334341
defaultSchema,
335342
])
336343

@@ -368,6 +375,8 @@ export const providerSettingsSchema = z.object({
368375
...zaiSchema.shape,
369376
...fireworksSchema.shape,
370377
...ioIntelligenceSchema.shape,
378+
...rooSchema.shape,
379+
...tarsSchema.shape,
371380
...codebaseIndexProviderSchema.shape,
372381
})
373382

packages/types/src/providers/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,4 @@ export * from "./xai.js"
2626
export * from "./doubao.js"
2727
export * from "./zai.js"
2828
export * from "./fireworks.js"
29+
export * from "./roo.js"
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import type { ModelInfo } from "../model.js"
2+
3+
// Roo provider with single model
4+
export type RooModelId = "roo/sonic"
5+
6+
export const rooDefaultModelId: RooModelId = "roo/sonic"
7+
8+
export const rooModels = {
9+
"roo/sonic": {
10+
maxTokens: 8192,
11+
contextWindow: 262_144,
12+
supportsImages: false,
13+
supportsPromptCache: false,
14+
inputPrice: 0,
15+
outputPrice: 0,
16+
description:
17+
"Stealth coding model with 262K context window, accessible for free through Roo Code Cloud for a limited time. (Note: prompts and completions are logged by the model creator and used to improve the model.)",
18+
},
19+
} as const satisfies Record<string, ModelInfo>

pnpm-lock.yaml

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

src/api/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import {
3636
DoubaoHandler,
3737
ZAiHandler,
3838
FireworksHandler,
39+
RooHandler,
3940
} from "./providers"
4041
import { NativeOllamaHandler } from "./providers/native-ollama"
4142

@@ -143,6 +144,8 @@ export function buildApiHandler(configuration: ProviderSettings): ApiHandler {
143144
return new FireworksHandler(options)
144145
case "io-intelligence":
145146
return new IOIntelligenceHandler(options)
147+
case "roo":
148+
return new RooHandler(options)
146149
default:
147150
apiProvider satisfies "gemini-cli" | undefined
148151
return new AnthropicHandler(options)

0 commit comments

Comments
 (0)