12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/legion/llm/api/native/routing.rb', line 12
def self.registered(app)
log.debug('[llm][api][routing] registering routing routes')
app.get '/api/llm/routing' do
log.debug('[llm][api][routing] action=list_rules')
require_llm!
json_response({
routing_enabled: false,
auto_rules_populated: false,
rules: [],
summary: { total: 0, auto: 0, manual: 0 }
})
rescue StandardError => e
handle_exception(e, level: :error, handled: true, operation: 'llm.api.routing.list')
json_error('routing_error', e.message, status_code: 500)
end
log.debug('[llm][api][routing] routing routes registered')
end
|