mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-08-28 19:11:03 +08:00
fix(gateway): support ES2022 metadata consumers
This commit is contained in:
@@ -54,7 +54,7 @@ type Data = z.infer<typeof dataSchema>
|
||||
function routed(meta: Gateway) {
|
||||
const route = meta.routing
|
||||
if (!route) return
|
||||
const hit = route.modelAttempts?.findLast((item) => item.success === true)
|
||||
const hit = route.modelAttempts?.slice().reverse().find((item) => item.success === true)
|
||||
const id = hit?.canonicalSlug ?? route.canonicalSlug
|
||||
if (!id) return
|
||||
const value = id.trim()
|
||||
|
||||
Reference in New Issue
Block a user