mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-05 08:10:14 +00:00
fix: use DEFAULT_FLAGS.model as single source of truth for default model ID
This commit is contained in:
parent
510cf8fc8a
commit
1991eb6517
2 changed files with 9 additions and 10 deletions
|
|
@ -134,11 +134,7 @@ describe("ModelService", () => {
|
|||
const result = await service.fetchAvailableModels()
|
||||
|
||||
// Should include default model first with actual model name
|
||||
expect(result[0]).toEqual({
|
||||
modelId: "anthropic/claude-sonnet-4.5",
|
||||
name: "Claude Sonnet 4.5",
|
||||
description: "Best balance of speed and capability",
|
||||
})
|
||||
expect(result[0]).toEqual(DEFAULT_MODELS[0])
|
||||
|
||||
// Should include transformed models
|
||||
expect(result.length).toBeGreaterThan(1)
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@
|
|||
|
||||
import type * as acp from "@agentclientprotocol/sdk"
|
||||
|
||||
import { DEFAULT_FLAGS } from "@/types/constants.js"
|
||||
|
||||
// =============================================================================
|
||||
// Model Types
|
||||
// =============================================================================
|
||||
|
|
@ -53,18 +55,19 @@ export interface ExtendedNewSessionResponse extends acp.NewSessionResponse {
|
|||
/**
|
||||
* Default models available when API is not accessible.
|
||||
* These map to Roo Code Cloud model tiers.
|
||||
* The first model uses DEFAULT_FLAGS.model as the source of truth.
|
||||
*/
|
||||
export const DEFAULT_MODELS: AcpModel[] = [
|
||||
{
|
||||
modelId: DEFAULT_FLAGS.model,
|
||||
name: "Claude Sonnet 4.5",
|
||||
description: "Best balance of speed and capability",
|
||||
},
|
||||
{
|
||||
modelId: "anthropic/claude-opus-4.5",
|
||||
name: "Claude Opus 4.5",
|
||||
description: "Most capable for complex work",
|
||||
},
|
||||
{
|
||||
modelId: "anthropic/claude-sonnet-4.5",
|
||||
name: "Claude Sonnet 4.5",
|
||||
description: "Best balance of speed and capability",
|
||||
},
|
||||
{
|
||||
modelId: "anthropic/claude-haiku-4.5",
|
||||
name: "Claude Haiku 4.5",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue