dragon6825 commited on
Commit
ac128ef
·
1 Parent(s): 7afbd22

Remove agent whitelist and claude4 model filter on challenge pages

Browse files
src/views/LeaderboardView.vue CHANGED
@@ -188,20 +188,7 @@ export default {
188
  rows = rows.filter(r => !excludedAgents.includes((r.agent_name || '').toLowerCase()))
189
  if (this.isChallengeLeaderboard) {
190
  const allowAssets = new Set(['BTC', 'TSLA'])
191
- const coreAgents = new Set(['tradeagent', 'hedgefundagent', 'deepfundagent', 'investoragent'])
192
- const isClaude4 = (model) => {
193
- const m = String(model || '').toLowerCase()
194
- return m.includes('claude') && m.includes('4')
195
- }
196
- const isGpt = (model) => String(model || '').toLowerCase().includes('gpt')
197
- const isGemini = (model) => String(model || '').toLowerCase().includes('gemini')
198
- rows = rows.filter(r => {
199
- const name = String(r.agent_name || '').toLowerCase()
200
- if (!allowAssets.has(r.asset)) return false
201
- if (coreAgents.has(name)) return isClaude4(r.model)
202
- if (name === 'vanilla' || name === 'vinilla') return isClaude4(r.model) || isGpt(r.model) || isGemini(r.model)
203
- return false
204
- })
205
  rows = rows.filter(r => r.strategy === 'long_short')
206
  }
207
  return rows
 
188
  rows = rows.filter(r => !excludedAgents.includes((r.agent_name || '').toLowerCase()))
189
  if (this.isChallengeLeaderboard) {
190
  const allowAssets = new Set(['BTC', 'TSLA'])
191
+ rows = rows.filter(r => allowAssets.has(r.asset))
 
 
 
 
 
 
 
 
 
 
 
 
 
192
  rows = rows.filter(r => r.strategy === 'long_short')
193
  }
194
  return rows
src/views/LiveView.vue CHANGED
@@ -241,21 +241,9 @@ const challengeDateRange = ref([0, 0])
241
  const challengeDateFilteredRows = ref([])
242
  const normalizeDate = (d) => String(d || '').split('T')[0]
243
  const challengeRawRows = computed(() => {
244
- const isGptModel = (model) => String(model || '').toLowerCase().includes('gpt')
245
- const isGeminiModel = (model) => String(model || '').toLowerCase().includes('gemini')
246
- const isVanilla = (name) => {
247
- const n = String(name || '').toLowerCase()
248
- return n === 'vanilla' || n === 'vinilla'
249
- }
250
- const excluded = new Set(['multi', 'finconagent'])
251
  return (rowsRef.value || []).filter(r => {
252
  if (r.asset !== asset.value) return false
253
  if (r.strategy !== 'long_short') return false
254
- const name = String(r.agent_name || '').toLowerCase()
255
- if (excluded.has(name)) return false
256
- if (LIVE_AGENT_WHITELIST.has(name)) return isClaude4Model(r.model)
257
- if (isVanilla(name)) return isClaude4Model(r.model) || isGptModel(r.model) || isGeminiModel(r.model)
258
- // For other agents, keep their rows (usually one model).
259
  return true
260
  })
261
  })
@@ -332,25 +320,7 @@ watch(challengeAllDates, (dates) => {
332
  }, { immediate: true })
333
  watch([challengeRawRows, challengeDateRange, isChallengePage], recomputeChallengeRows, { deep: true, immediate: true })
334
  const challengeLeaderboardRows = computed(() => {
335
- const isVanilla = (name) => {
336
- const n = String(name || '').toLowerCase()
337
- return n === 'vanilla' || n === 'vinilla'
338
- }
339
- const rows = (challengeDateFilteredRows.value || []).map(r => {
340
- const name = String(r.agent_name || '').toLowerCase()
341
- if (LIVE_AGENT_WHITELIST.has(name)) {
342
- return { ...r, model: '' }
343
- }
344
- if (name !== 'vanilla' && name !== 'vinilla') {
345
- return { ...r, model: '' }
346
- }
347
- if (!isVanilla(r.agent_name)) return r
348
- return {
349
- ...r,
350
- agent_name: formatModelName(r.model),
351
- model: ''
352
- }
353
- })
354
  return rows.sort((a, b) => (Number(b.ret_with_fees) || 0) - (Number(a.ret_with_fees) || 0))
355
  })
356
 
@@ -437,12 +407,12 @@ const isClaude4Model = (model) => {
437
  return m.includes('claude') && m.includes('sonnet') && m.includes('4')
438
  }
439
 
440
- /* rows for selected asset - only show whitelisted agents + tab strategy */
441
  const filteredRows = computed(() =>
442
  (rowsRef.value || []).filter(r => {
443
  if (r.asset !== asset.value) return false
444
  if (r.strategy !== viewStrategy.value) return false
445
- if (route.path === '/live-challenge' && !isClaude4Model(r.model)) return false
446
  const name = (r?.agent_name || '').toLowerCase()
447
  return LIVE_AGENT_WHITELIST.has(name)
448
  })
 
241
  const challengeDateFilteredRows = ref([])
242
  const normalizeDate = (d) => String(d || '').split('T')[0]
243
  const challengeRawRows = computed(() => {
 
 
 
 
 
 
 
244
  return (rowsRef.value || []).filter(r => {
245
  if (r.asset !== asset.value) return false
246
  if (r.strategy !== 'long_short') return false
 
 
 
 
 
247
  return true
248
  })
249
  })
 
320
  }, { immediate: true })
321
  watch([challengeRawRows, challengeDateRange, isChallengePage], recomputeChallengeRows, { deep: true, immediate: true })
322
  const challengeLeaderboardRows = computed(() => {
323
+ const rows = (challengeDateFilteredRows.value || []).slice()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
324
  return rows.sort((a, b) => (Number(b.ret_with_fees) || 0) - (Number(a.ret_with_fees) || 0))
325
  })
326
 
 
407
  return m.includes('claude') && m.includes('sonnet') && m.includes('4')
408
  }
409
 
410
+ /* rows for selected asset + tab strategy */
411
  const filteredRows = computed(() =>
412
  (rowsRef.value || []).filter(r => {
413
  if (r.asset !== asset.value) return false
414
  if (r.strategy !== viewStrategy.value) return false
415
+ if (route.path === '/live-challenge') return true
416
  const name = (r?.agent_name || '').toLowerCase()
417
  return LIVE_AGENT_WHITELIST.has(name)
418
  })