Skip to content

Commit 4d6dcf9

Browse files
committed
Fix for free mode
1 parent 658a39b commit 4d6dcf9

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

common/src/constants/free-agents.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,16 @@ export function isFreeModeAllowedAgentModel(
100100
// For these, any model check should fail (they shouldn't be making LLM calls)
101101
if (allowedModels.size === 0) return false
102102

103-
return allowedModels.has(model)
103+
// Exact match first
104+
if (allowedModels.has(model)) return true
105+
106+
// OpenRouter may return dated variants (e.g. "minimax/minimax-m2.5-20260211")
107+
// so also check if the returned model starts with any allowed model prefix.
108+
for (const allowed of allowedModels) {
109+
if (model.startsWith(allowed + '-')) return true
110+
}
111+
112+
return false
104113
}
105114

106115
/**

0 commit comments

Comments
 (0)