Skip to content
This repository was archived by the owner on May 15, 2026. It is now read-only.

Commit 5c75bf6

Browse files
committed
Resolve router removal message at runtime
1 parent 6fbf91b commit 5c75bf6

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

src/api/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import OpenAI from "openai"
33

44
import { isRetiredProvider, type ProviderSettings, type ModelInfo } from "@roo-code/types"
55

6-
import { ROUTER_REMOVAL_MESSAGE } from "../core/config/routerRemoval"
6+
import { getRouterRemovalMessage } from "../core/config/routerRemoval"
77
import { ApiStream } from "./transform/stream"
88

99
import {
@@ -113,7 +113,7 @@ export function buildApiHandler(configuration: ProviderSettings): ApiHandler {
113113
const { apiProvider, ...options } = configuration
114114

115115
if (apiProvider === "roo") {
116-
throw new Error(ROUTER_REMOVAL_MESSAGE)
116+
throw new Error(getRouterRemovalMessage())
117117
}
118118

119119
if (apiProvider && isRetiredProvider(apiProvider)) {

src/core/config/routerRemoval.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ export const getRouterRemovalMessage = () =>
2121
export const getRouterUnavailableSignInMessage = () =>
2222
getLocalizedMessage(ROUTER_SIGN_IN_UNAVAILABLE_I18N_KEY, ROUTER_SIGN_IN_UNAVAILABLE_DEFAULT_MESSAGE)
2323

24-
export const ROUTER_REMOVAL_MESSAGE = getRouterRemovalMessage()
25-
2624
export const ROUTER_REMOVAL_IMPORT_WARNING =
2725
"Roo Code Router was removed. The imported profile was downgraded and needs to be reconfigured."
2826

0 commit comments

Comments
 (0)