mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-14 23:21:19 +00:00
Merge 9ec2738217 into ad25634905
This commit is contained in:
commit
4577ea2669
3 changed files with 14 additions and 14 deletions
|
|
@ -6,7 +6,7 @@ import type { ModelInfo } from "../model.js"
|
|||
* Roo Code Cloud is a dynamic provider - models are loaded from the /v1/models API endpoint.
|
||||
* Default model ID used as fallback when no model is specified.
|
||||
*/
|
||||
export const rooDefaultModelId = "xai/grok-code-fast-1"
|
||||
export const rooDefaultModelId = "anthropic/claude-sonnet-4.5"
|
||||
|
||||
/**
|
||||
* Empty models object maintained for type compatibility.
|
||||
|
|
|
|||
|
|
@ -93,14 +93,14 @@ vitest.mock("../../providers/fetchers/modelCache", () => ({
|
|||
getModelsFromCache: vitest.fn((provider: string) => {
|
||||
if (provider === "roo") {
|
||||
return {
|
||||
"xai/grok-code-fast-1": {
|
||||
maxTokens: 16_384,
|
||||
contextWindow: 262_144,
|
||||
supportsImages: false,
|
||||
supportsReasoningEffort: true, // Enable reasoning for tests
|
||||
"anthropic/claude-sonnet-4.5": {
|
||||
maxTokens: 8_192,
|
||||
contextWindow: 200_000,
|
||||
supportsImages: true,
|
||||
supportsReasoningEffort: true,
|
||||
supportsPromptCache: true,
|
||||
inputPrice: 0,
|
||||
outputPrice: 0,
|
||||
inputPrice: 3,
|
||||
outputPrice: 15,
|
||||
},
|
||||
"minimax/minimax-m2:free": {
|
||||
maxTokens: 32_768,
|
||||
|
|
@ -141,7 +141,7 @@ describe("RooHandler", () => {
|
|||
|
||||
beforeEach(() => {
|
||||
mockOptions = {
|
||||
apiModelId: "xai/grok-code-fast-1",
|
||||
apiModelId: "anthropic/claude-sonnet-4.5",
|
||||
}
|
||||
// Set up CloudService mocks for successful authentication
|
||||
mockHasInstanceFn.mockReturnValue(true)
|
||||
|
|
@ -410,7 +410,7 @@ describe("RooHandler", () => {
|
|||
|
||||
it("should handle any model ID since models are loaded dynamically", () => {
|
||||
// Test with various model IDs - they should all work since models are loaded dynamically
|
||||
const testModelIds = ["xai/grok-code-fast-1", "roo/sonic", "deepseek/deepseek-chat-v3.1"]
|
||||
const testModelIds = ["anthropic/claude-sonnet-4.5", "roo/sonic", "deepseek/deepseek-chat-v3.1"]
|
||||
|
||||
for (const modelId of testModelIds) {
|
||||
const handlerWithModel = new RooHandler({ apiModelId: modelId })
|
||||
|
|
|
|||
|
|
@ -24,11 +24,11 @@ describe("getRooModels", () => {
|
|||
object: "list",
|
||||
data: [
|
||||
{
|
||||
id: "xai/grok-code-fast-1",
|
||||
id: "anthropic/claude-sonnet-4.5",
|
||||
object: "model",
|
||||
created: 1234567890,
|
||||
owned_by: "xai",
|
||||
name: "Grok Code Fast 1",
|
||||
owned_by: "anthropic",
|
||||
name: "Claude Sonnet 4.5",
|
||||
description: "Fast coding model",
|
||||
context_window: 262144,
|
||||
max_tokens: 16384,
|
||||
|
|
@ -63,7 +63,7 @@ describe("getRooModels", () => {
|
|||
)
|
||||
|
||||
expect(models).toEqual({
|
||||
"xai/grok-code-fast-1": {
|
||||
"anthropic/claude-sonnet-4.5": {
|
||||
maxTokens: 16384,
|
||||
contextWindow: 262144,
|
||||
supportsImages: true,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue