@@ -94,6 +94,7 @@ import type { ClineMessage } from "@roo-code/types"
9494import { readApiMessages , saveApiMessages , saveTaskMessages } from "../task-persistence"
9595import { getNonce } from "./getNonce"
9696import { getUri } from "./getUri"
97+ import { REQUESTY_BASE_URL } from "../../shared/utils/requesty"
9798
9899/**
99100 * https://github.com/microsoft/vscode-webview-ui-toolkit-samples/blob/main/default/weather-webview/src/providers/WeatherViewProvider.ts
@@ -1456,14 +1457,22 @@ export class ClineProvider
14561457
14571458 // Requesty
14581459
1459- async handleRequestyCallback ( code : string ) {
1460- const { apiConfiguration } = await this . getState ( )
1460+ async handleRequestyCallback ( code : string , baseUrl : string | null ) {
1461+ let { apiConfiguration } = await this . getState ( )
14611462
14621463 const newConfiguration : ProviderSettings = {
14631464 ...apiConfiguration ,
14641465 apiProvider : "requesty" ,
14651466 requestyApiKey : code ,
1466- requestyModelId : requestyDefaultModelId ,
1467+ requestyModelId : apiConfiguration ?. requestyModelId || requestyDefaultModelId ,
1468+ }
1469+
1470+ // set baseUrl as undefined if we don't provide one
1471+ // or if it is the default requesty url
1472+ if ( ! baseUrl || baseUrl === REQUESTY_BASE_URL ) {
1473+ newConfiguration . requestyBaseUrl = undefined
1474+ } else {
1475+ newConfiguration . requestyBaseUrl = baseUrl
14671476 }
14681477
14691478 await this . upsertProviderProfile ( "Requesty" , newConfiguration )
0 commit comments