From a9a113bacedbb34748b4258f57a2c66ff9797b7b Mon Sep 17 00:00:00 2001 From: aakashb95 Date: Wed, 17 Dec 2025 15:19:24 +0530 Subject: [PATCH] add config routes --- .../api/v1/accounts/captain/config_controller.rb | 11 +++++++++++ config/routes.rb | 1 + 2 files changed, 12 insertions(+) create mode 100644 app/controllers/api/v1/accounts/captain/config_controller.rb diff --git a/app/controllers/api/v1/accounts/captain/config_controller.rb b/app/controllers/api/v1/accounts/captain/config_controller.rb new file mode 100644 index 000000000..8b59ad7a5 --- /dev/null +++ b/app/controllers/api/v1/accounts/captain/config_controller.rb @@ -0,0 +1,11 @@ +class Api::V1::Accounts::Captain::ConfigController < Api::V1::Accounts::BaseController + before_action :current_account + + def show + render json: { + providers: Llm::ConfigService.providers, + models: Llm::ConfigService.models, + features: Llm::ConfigService.all_features_config + } + end +end diff --git a/config/routes.rb b/config/routes.rb index 0ac001612..380e8ba28 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -52,6 +52,7 @@ Rails.application.routes.draw do post :bulk_create, on: :collection end namespace :captain do + resource :config, only: [:show], controller: 'config' resources :assistants do member do post :playground