layered-assistant-rails 0.3.2 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d8d828826c0b73a9efaa2324f15d1e7d684c2b3c00c760421d6d18bbf3f88d39
4
- data.tar.gz: 11f5f52acb971db3b8bee92f6c5739e8cb89c7f5cbbd9411db8570fd53c2be87
3
+ metadata.gz: 609342ee9956936967616a13c2d86a350cbbf099875cc5bc5321730dd0280c71
4
+ data.tar.gz: 89adcbc8c2f24834724e710427f7c7acc93d2d444b78d11d2005e3eb80d171cb
5
5
  SHA512:
6
- metadata.gz: d0e8c773d9b788562089ca773c615c1871e7440f453f18f8822074b83ea69db544cd747e8c540a21c10d53fb7babe3c37fe70245ce6bfc31a64fe496dff5a2ae
7
- data.tar.gz: 3d3ee90a358372e72cdadccf200fff09e56adadfefc01c8a010991febc54281466b447d8730b6e00969a29225a56e38e5349187cd23b119274463e610f792fa1
6
+ metadata.gz: a8e997c64ebdb5685d15571096f7539887995392850f68e1454cd579de82294d7c0eb6bbcae433984d8afabe62674b568fb13b241605b46827bbbd0e4476b871
7
+ data.tar.gz: 00dd1808b570ff2204ba9866f589b5bc0ab159dd223846d3a9c6f12cbad6e685fb4d6a46e2c074b8c1f55a503ac83ac8b0c68a16f93c63a26a3fc665f9620bc9
data/README.md CHANGED
@@ -208,6 +208,10 @@ Run the gem tests from the root directory:
208
208
  bundle exec rake test
209
209
  ```
210
210
 
211
+ ## Contributing
212
+
213
+ This project is still in its early days. We welcome issues, feedback, and ideas - they genuinely help shape the direction of the project. That said, we're holding off on accepting pull requests for now to stay focused on getting the foundations right. Thank you for your patience and interest. See [CLA.md](CLA.md) for the full policy.
214
+
211
215
  ## License
212
216
 
213
217
  Released under the [Apache 2.0 License](LICENSE).
@@ -217,7 +221,3 @@ Copyright 2026 LAYERED AI LIMITED (UK company number: 17056830). See [NOTICE](NO
217
221
  ## Trademarks
218
222
 
219
223
  The source code is fully open, but the layered.ai name, logo, and brand assets are trademarks of LAYERED AI LIMITED. The Apache 2.0 license does not grant rights to use the layered.ai branding. Forks and redistributions must use a distinct name. See [TRADEMARK.md](TRADEMARK.md) for the full policy.
220
-
221
- ## Contributing
222
-
223
- - [CLA.md](CLA.md) - contributor license agreement
@@ -12,7 +12,7 @@ module Layered
12
12
  }
13
13
  if @provider.url.present?
14
14
  client_options[:uri_base] = @provider.url.sub(/\/\z/, "")
15
- client_options[:api_version] = "" # Gemini and other OpenAI-compatible APIs use their own path
15
+ client_options[:api_version] = "" # Gemini and other OpenAI-compatible APIs use their own path
16
16
  end
17
17
 
18
18
  ::OpenAI::Client.new(**client_options) do |f|
@@ -6,13 +6,14 @@ module Layered
6
6
  module Models
7
7
  class CreateService
8
8
  MODELS_URL = "https://raw.githubusercontent.com/layered-ai-public/layered-assistant-rails/main/data/models.json".freeze
9
+ LOCAL_MODELS_PATH = Layered::Assistant::Engine.root.join("data", "models.json").freeze
9
10
 
10
11
  def initialize(provider)
11
12
  @provider = provider
12
13
  end
13
14
 
14
15
  def call
15
- models_data = fetch_models
16
+ models_data = Rails.env.development? ? load_local_models : fetch_models
16
17
  return if models_data.nil?
17
18
 
18
19
  entries = models_data[@provider.name]
@@ -30,6 +31,16 @@ module Layered
30
31
 
31
32
  private
32
33
 
34
+ def load_local_models
35
+ unless File.exist?(LOCAL_MODELS_PATH)
36
+ Rails.logger.info "[layered-ui-assistant] Local model catalogue not found at #{LOCAL_MODELS_PATH} - skipping model sync"
37
+ return nil
38
+ end
39
+
40
+ Rails.logger.info "[layered-ui-assistant] Loading model catalogue from local file (development)"
41
+ JSON.parse(File.read(LOCAL_MODELS_PATH))
42
+ end
43
+
33
44
  def fetch_models
34
45
  uri = URI(MODELS_URL)
35
46
  response = Net::HTTP.get_response(uri)
@@ -16,7 +16,6 @@
16
16
  data-action="click->messages#jumpToBottom"
17
17
  aria-label="Scroll to bottom"
18
18
  type="button">
19
- <%= image_tag "layered_ui/icon_chevron_down.svg", class: "l-ui-icon--sm l-ui-icon--dark-invert", alt: "" %>
20
19
  </button>
21
20
  </div>
22
21
 
@@ -14,7 +14,6 @@
14
14
  data-action="click->messages#jumpToBottom"
15
15
  aria-label="Scroll to bottom"
16
16
  type="button">
17
- <%= image_tag "layered_ui/icon_chevron_down.svg", class: "l-ui-icon--sm l-ui-icon--dark-invert", alt: "" %>
18
17
  </button>
19
18
  </div>
20
19
 
@@ -24,7 +24,6 @@
24
24
  data-action="click->messages#jumpToBottom"
25
25
  aria-label="Scroll to bottom"
26
26
  type="button">
27
- <%= image_tag "layered_ui/icon_chevron_down.svg", class: "l-ui-icon--sm l-ui-icon--dark-invert", alt: "" %>
28
27
  </button>
29
28
  </div>
30
29
 
@@ -14,7 +14,6 @@
14
14
  data-action="click->messages#jumpToBottom"
15
15
  aria-label="Scroll to bottom"
16
16
  type="button">
17
- <%= image_tag "layered_ui/icon_chevron_down.svg", class: "l-ui-icon--sm l-ui-icon--dark-invert", alt: "" %>
18
17
  </button>
19
18
  </div>
20
19
 
data/data/models.json CHANGED
@@ -1,42 +1,45 @@
1
1
  {
2
2
  "Anthropic": [
3
- { "name": "Claude Opus 4.6", "identifier": "claude-opus-4-6" },
3
+ { "name": "Claude Opus 4.7", "identifier": "claude-opus-4-7" },
4
4
  { "name": "Claude Sonnet 4.6", "identifier": "claude-sonnet-4-6" },
5
5
  { "name": "Claude Haiku 4.5", "identifier": "claude-haiku-4-5" }
6
6
  ],
7
7
  "OpenAI": [
8
+ { "name": "GPT-5.5", "identifier": "gpt-5.5" },
9
+ { "name": "GPT-5.5 Pro", "identifier": "gpt-5.5-pro" },
8
10
  { "name": "GPT-5.4", "identifier": "gpt-5.4" },
9
- { "name": "GPT-5 Mini", "identifier": "gpt-5-mini" }
11
+ { "name": "GPT-5.4 Mini", "identifier": "gpt-5.4-mini" },
12
+ { "name": "GPT-5.4 Nano", "identifier": "gpt-5.4-nano" }
10
13
  ],
11
14
  "Gemini": [
12
15
  { "name": "Gemini 3.1 Pro Preview", "identifier": "gemini-3.1-pro-preview" },
13
- { "name": "Gemini 2.5 Flash Lite", "identifier": "gemini-2.5-flash-lite" },
16
+ { "name": "Gemini 3 Flash Preview", "identifier": "gemini-3-flash-preview" },
17
+ { "name": "Gemini 3.1 Flash-Lite Preview", "identifier": "gemini-3.1-flash-lite-preview" },
18
+ { "name": "Gemini 2.5 Pro", "identifier": "gemini-2.5-pro" },
14
19
  { "name": "Gemini 2.5 Flash", "identifier": "gemini-2.5-flash" },
15
- { "name": "Gemini 2.5 Pro", "identifier": "gemini-2.5-pro" }
20
+ { "name": "Gemini 2.5 Flash Lite", "identifier": "gemini-2.5-flash-lite" }
16
21
  ],
17
22
  "OpenRouter": [
18
- { "name": "MiniMax M2.5", "identifier": "minimax/minimax-m2.5" },
19
- { "name": "DeepSeek V3.2", "identifier": "deepseek/deepseek-v3.2" },
23
+ { "name": "Grok 4.1 Fast", "identifier": "x-ai/grok-4.1-fast" },
20
24
  { "name": "Grok 4", "identifier": "x-ai/grok-4" },
21
- { "name": "Grok 4 (Fast)", "identifier": "x-ai/grok-4-fast" },
22
- { "name": "Grok 3", "identifier": "x-ai/grok-3" },
23
- { "name": "Llama 4 Maverick", "identifier": "meta-llama/llama-4-maverick-17b-128e-instruct" },
24
- { "name": "Llama 4 Scout", "identifier": "meta-llama/llama-4-scout-17b-16e-instruct" }
25
+ { "name": "DeepSeek V3.2", "identifier": "deepseek/deepseek-v3.2" },
26
+ { "name": "Kimi K2.6", "identifier": "moonshotai/kimi-k2.6" },
27
+ { "name": "MiniMax M2.7", "identifier": "minimax/minimax-m2.7" },
28
+ { "name": "MiniMax M2.5", "identifier": "minimax/minimax-m2.5" },
29
+ { "name": "MiMo V2 Pro", "identifier": "xiaomi/mimo-v2-pro" }
25
30
  ],
26
31
  "Groq": [
27
32
  { "name": "Compound", "identifier": "groq/compound" },
28
33
  { "name": "Compound Mini", "identifier": "groq/compound-mini" },
29
34
  { "name": "GPT-OSS 120B", "identifier": "openai/gpt-oss-120b" },
30
- { "name": "Llama 4 Maverick", "identifier": "meta-llama/llama-4-maverick-17b-128e-instruct" },
31
- { "name": "Llama 4 Scout", "identifier": "meta-llama/llama-4-scout-17b-16e-instruct" },
35
+ { "name": "GPT-OSS 20B", "identifier": "openai/gpt-oss-20b" },
32
36
  { "name": "Llama 3.3 70B Versatile", "identifier": "llama-3.3-70b-versatile" },
33
- { "name": "Llama 3.1 8B Instant", "identifier": "llama-3.1-8b-instant" },
34
- { "name": "Qwen 3 32B", "identifier": "qwen/qwen3-32b" },
35
- { "name": "Kimi K2.5", "identifier": "moonshotai/kimi-k2-instruct-0905" }
37
+ { "name": "Llama 3.1 8B Instant", "identifier": "llama-3.1-8b-instant" }
36
38
  ],
37
39
  "Mistral": [
38
- { "name": "Mistral Large 2512", "identifier": "mistral-large-2512" },
39
- { "name": "Mistral Medium 2508", "identifier": "mistral-medium-2508" },
40
- { "name": "Mistral Small 2506", "identifier": "mistral-small-2506" }
40
+ { "name": "Mistral Large 3", "identifier": "mistral-large-2512" },
41
+ { "name": "Mistral Medium 3.1", "identifier": "mistral-medium-2508" },
42
+ { "name": "Mistral Small 4", "identifier": "mistral-small-2603" },
43
+ { "name": "Magistral Medium 1.2", "identifier": "magistral-medium-2509" }
41
44
  ]
42
45
  }
@@ -1,5 +1,5 @@
1
1
  module Layered
2
2
  module Assistant
3
- VERSION = "0.3.2"
3
+ VERSION = "0.4.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: layered-assistant-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - layered.ai
@@ -113,14 +113,14 @@ dependencies:
113
113
  requirements:
114
114
  - - "~>"
115
115
  - !ruby/object:Gem::Version
116
- version: 0.2.1
116
+ version: '0.8'
117
117
  type: :runtime
118
118
  prerelease: false
119
119
  version_requirements: !ruby/object:Gem::Requirement
120
120
  requirements:
121
121
  - - "~>"
122
122
  - !ruby/object:Gem::Version
123
- version: 0.2.1
123
+ version: '0.8'
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: propshaft
126
126
  requirement: !ruby/object:Gem::Requirement