Local branch had diverged from origin/master (sibling commits on the same base). Rewrote local history linearly on top of origin/master, folding in all local content: exa/hot-platform discovery hunters, leaks ledger, nightly sweep orchestrator, updated .gitignore and skill docs, plus the latest hunt output and vault state. Remote-only files (vault keys, channel scripts) were restored rather than dropped, so the resulting tree is a full union of both sides.
1 line
3.2 KiB
JSON
1 line
3.2 KiB
JSON
{"repo": "chandresh-ship-it/dakshai", "files": {"lib/llm/config.rb": {"85e8701fc63c446326722d3b06f17185eb81e127": {"t": 1786068310.795299, "n": 2985, "h": "836a54ba7b818b7c", "c": "require 'ruby_llm'\nrequire 'openssl'\n\nmodule Llm::Config\n DEFAULT_MODEL = 'gpt-4.1-mini'.freeze\n\n class << self\n def initialized?\n @initialized ||= false\n end\n\n def initialize!\n return if @initialized\n\n if Rails.env.development? || Rails.env.test?\n OpenSSL::SSL.send(:remove_const, :VERIFY_PEER)\n OpenSSL::SSL.const_set(:VERIFY_PEER, OpenSSL::SSL::VERIFY_NONE)\n end\n\n configure_ruby_llm\n @initialized = true\n end\n\n def reset!\n @initialized = false\n end\n\n def with_api_key(api_key, api_base: nil)\n initialize!\n context = RubyLLM.context do |config|\n config.openai_api_key = api_key\n config.openai_api_base = api_base\n config.openrouter_api_key = api_key\n config.anthropic_api_key = api_key\n config.gemini_api_key = api_key\n config.deepseek_api_key = api_key\n\n if api_base.present? && !api_base.include?('api.openai.com')\n if api_base.include?('openrouter.ai')\n normalized_base = api_base.end_with?('/v1') ? api_base : \"#{api_base.sub(/\\/api$/, '')}/api/v1\"\n config.openai_api_base = normalized_base\n config.openrouter_api_base = normalized_base\n else\n config.openai_api_base = api_base\n config.openrouter_api_base = api_base\n end\n config.anthropic_api_base = api_base\n config.gemini_api_base = api_base\n config.deepseek_api_base = api_base\n end\n end\n\n yield context\n end\n\n private\n\n def configure_ruby_llm\n RubyLLM.configure do |config|\n config.openai_api_key = system_api_key if system_api_key.present?\n config.openrouter_api_key = system_api_key if system_api_key.present?\n config.anthropic_api_key = system_api_key if system_api_key.present?\n config.gemini_api_key = system_api_key if system_api_key.present?\n config.deepseek_api_key = system_api_key if system_api_key.present?\n\n if openai_endpoint.present?\n endpoint = openai_endpoint.chomp('/')\n if endpoint.include?('openrouter.ai')\n normalized_endpoint = endpoint.end_with?('/v1') ? endpoint : \"#{endpoint.sub(/\\/api$/, '')}/api/v1\"\n config.openai_api_base = normalized_endpoint\n config.openrouter_api_base = normalized_endpoint\n else\n config.openai_api_base = endpoint\n config.openrouter_api_base = endpoint\n end\n config.anthropic_api_base = endpoint\n config.gemini_api_base = endpoint\n config.deepseek_api_base = endpoint\n end\n\n config.model_registry_file = Rails.root.join('config/llm_models.json').to_s\n config.logger = Rails.logger\n end\n end\n\n def system_api_key\n InstallationConfig.find_by(name: 'CAPTAIN_OPEN_AI_API_KEY')&.value\n end\n\n def openai_endpoint\n InstallationConfig.find_by(name: 'CAPTAIN_OPEN_AI_ENDPOINT')&.value\n end\n end\nend\n"}}}} |