Skip to content

Commit 7ed6620

Browse files
committed
fix: correct fallback model info for unknown model IDs
The getModel() method in RooHandler was incorrectly using the roo/sonic model info as fallback for unknown models. This fix ensures that unknown models get a proper fallback with supportsPromptCache set to false, which aligns with the test expectations.
1 parent d6f4547 commit 7ed6620

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/api/providers/roo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export class RooHandler extends BaseOpenAiCompatibleProvider<RooModelId> {
7171

7272
override getModel() {
7373
const modelId = this.options.apiModelId || rooDefaultModelId
74-
const modelInfo = this.providerModels[modelId as RooModelId] ?? this.providerModels[rooDefaultModelId]
74+
const modelInfo = this.providerModels[modelId as RooModelId]
7575

7676
if (modelInfo) {
7777
return { id: modelId as RooModelId, info: modelInfo }

0 commit comments

Comments
 (0)