soka-rails 0.0.5 → 0.0.6

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: 727e9c42b3117990a0eb0237b5a12e9db9eafe6ad5cb3b2e6992a5de89920153
4
- data.tar.gz: 48072884855827edbad3bba576d324d6d79dd888ba347d8b67af5977341acbdc
3
+ metadata.gz: ee9fc187903bf7637697d54e7121c027dd9f5a5b348a79e958b7a10a21de69b6
4
+ data.tar.gz: 1a84fd9dd78cf7fcd5ab6445e7791095581b71b9a61a2c5aa300152aa4c62f4f
5
5
  SHA512:
6
- metadata.gz: 32e97666a15b7e655a9a208c439b55c287a8701fac1a03282553aa0b14d4d81a28e7f564509069cce9d5142affeae1fa13dcf836699a80e4bd8bc455d1e220bb
7
- data.tar.gz: 31d91665ae6af181d9db5a33cecb18de6561f31d259095a89d10ba01e23d0aa87346094d58d4b47fbebc6ec5539200e1e26e323fa92eb3835c552abd613a0070
6
+ metadata.gz: 6f95ad17957330cd300aef32b9a4c2fd408ac36422428257c26d70e81981b57495ba69abc7f74649833f96dfa43f551a9fb55bed6e5ecff7bcfed842304424fb
7
+ data.tar.gz: 92a2ee49f26505b9f2a21904d5e5340bfbb94b9715a6ba30d850fe3c10deeeeff25fc1033fd0644e038a28a3be11589b89763e1b34d5f26f55a880df5dac06f0
data/CHANGELOG.md CHANGED
@@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.0.6] - 2025-08-12
9
+
10
+ ### Changed
11
+ - Removed timeout configuration from Rails integration - timeout is now managed by underlying Soka gem
12
+ - Updated default AI model from gemini-2.0-flash-exp to gemini-2.5-flash-lite
13
+ - Updated soka dependency to version 0.0.6
14
+
15
+ ### Documentation
16
+ - Updated documentation to reflect timeout removal
17
+
18
+ ### Tests
19
+ - Updated test fixtures with new model names (gpt-5-mini, claude-sonnet-4-0)
20
+
8
21
  ## [0.0.5] - 2025-08-05
9
22
 
10
23
  ### Added
data/DESIGN.md CHANGED
@@ -106,17 +106,16 @@ module Soka
106
106
  module Rails
107
107
  class Configuration
108
108
  attr_accessor :ai_provider, :ai_model, :ai_api_key
109
- attr_accessor :max_iterations, :timeout
109
+ attr_accessor :max_iterations
110
110
 
111
111
  def initialize
112
112
  # Use ENV.fetch to set default values
113
113
  @ai_provider = ENV.fetch('SOKA_PROVIDER', :gemini).to_sym
114
- @ai_model = ENV.fetch('SOKA_MODEL', 'gemini-2.0-flash-exp')
114
+ @ai_model = ENV.fetch('SOKA_MODEL', 'gemini-2.5-flash-lite')
115
115
  @ai_api_key = ENV.fetch('SOKA_API_KEY', nil)
116
116
 
117
117
  # Performance settings
118
118
  @max_iterations = ::Rails.env.production? ? 10 : 5
119
- @timeout = 30.seconds
120
119
  end
121
120
 
122
121
  # DSL configuration methods
@@ -155,10 +154,6 @@ module Soka
155
154
  def max_iterations=(value)
156
155
  @config.max_iterations = value
157
156
  end
158
-
159
- def timeout=(value)
160
- @config.timeout = value
161
- end
162
157
  end
163
158
  end
164
159
 
@@ -186,7 +181,6 @@ class ApplicationAgent < Soka::Agent
186
181
  # Rails environment default configuration
187
182
  if defined?(::Rails)
188
183
  max_iterations ::Rails.env.production? ? 10 : 5
189
- timeout 30.seconds
190
184
  end
191
185
 
192
186
  # Default tools
@@ -538,7 +532,6 @@ module Soka
538
532
  Soka::Rails.configure do |config|
539
533
  config.ai_provider = :mock
540
534
  config.max_iterations = 3
541
- config.timeout = 5.seconds
542
535
  yield config if block_given?
543
536
  end
544
537
 
@@ -713,8 +706,7 @@ module Soka
713
706
  def get_pool(provider)
714
707
  @mutex.synchronize do
715
708
  @pools[provider] ||= ConnectionPool.new(
716
- size: pool_size,
717
- timeout: pool_timeout
709
+ size: pool_size
718
710
  ) do
719
711
  create_connection(provider)
720
712
  end
@@ -725,10 +717,6 @@ module Soka
725
717
  ::Rails.env.production? ? 10 : 2
726
718
  end
727
719
 
728
- def pool_timeout
729
- 5.seconds
730
- end
731
-
732
720
  def create_connection(provider)
733
721
  Soka::LLM.new(provider: provider)
734
722
  end
@@ -764,11 +752,6 @@ module Soka
764
752
  end
765
753
  end
766
754
 
767
- class AgentTimeoutError < AgentError
768
- def initialize(timeout)
769
- super("Agent execution timeout after #{timeout} seconds")
770
- end
771
- end
772
755
  end
773
756
  end
774
757
  ```
@@ -951,4 +934,4 @@ end
951
934
  ### Phase 5: Documentation & Release (Week 9-10)
952
935
  1. API documentation
953
936
  2. Usage guide
954
- 3. Gem release preparation
937
+ 3. Gem release preparation
data/README.md CHANGED
@@ -127,7 +127,6 @@ class WeatherAgent < ApplicationAgent
127
127
  provider :gemini
128
128
  model 'gemini-2.5-flash-lite'
129
129
  max_iterations 10
130
- timeout 30.seconds
131
130
 
132
131
  # Register tools
133
132
  tool WeatherApiTool
@@ -328,7 +327,6 @@ class WeatherAgent < ApplicationAgent
328
327
 
329
328
  # Configuration
330
329
  # max_iterations 10
331
- # timeout 30
332
330
  end
333
331
  ```
334
332
 
@@ -339,7 +337,7 @@ end
339
337
  rails generate soka:tool weather_api
340
338
 
341
339
  # With parameters - automatically generates parameter definitions
342
- rails generate soka:tool weather_api location:string units:string timeout:integer
340
+ rails generate soka:tool weather_api location:string units:string
343
341
  ```
344
342
 
345
343
  Creates `app/soka/tools/weather_api_tool.rb` with parameter definitions.
@@ -353,7 +351,6 @@ class WeatherApiTool < ApplicationTool
353
351
  params do
354
352
  requires :location, String, desc: 'Location'
355
353
  requires :units, String, desc: 'Units'
356
- requires :timeout, Integer, desc: 'Timeout'
357
354
  end
358
355
 
359
356
  def call(**params)
@@ -463,7 +460,6 @@ Soka::Rails.configure do |config|
463
460
 
464
461
  config.performance do |perf|
465
462
  perf.max_iterations = Rails.env.production? ? 10 : 5
466
- perf.timeout = 30.seconds
467
463
  end
468
464
  end
469
465
  ```
data/SPEC.md CHANGED
@@ -67,7 +67,6 @@ Soka::Rails.configure do |config|
67
67
  # Performance configuration
68
68
  config.performance do |perf|
69
69
  perf.max_iterations = Rails.env.production? ? 10 : 5
70
- perf.timeout = 30.seconds
71
70
  end
72
71
  end
73
72
  ```
@@ -82,7 +81,6 @@ class ApplicationAgent < Soka::Agent
82
81
  # Default configuration for Rails environment
83
82
  if Rails.env.development?
84
83
  max_iterations 5
85
- timeout 15.seconds
86
84
  end
87
85
 
88
86
  # Auto-register Rails related tools
@@ -241,7 +239,6 @@ class WeatherAgent < ApplicationAgent
241
239
 
242
240
  # Configuration
243
241
  # max_iterations 10
244
- # timeout 30.seconds
245
242
 
246
243
  # Hooks
247
244
  # before_action :your_method
@@ -21,7 +21,6 @@ class <%= @agent_class_name %> < ApplicationAgent
21
21
 
22
22
  # Configuration
23
23
  # max_iterations 10
24
- # timeout 30
25
24
 
26
25
  # Hooks
27
26
  # before_action :your_method
@@ -11,7 +11,7 @@ Soka::Rails.configure do |config|
11
11
 
12
12
  # Setup OpenAI
13
13
  # ai.provider = :openai
14
- # ai.model = 'gpt-4.1-mini'
14
+ # ai.model = 'gpt-5-mini'
15
15
  # ai.api_key = ENV.fetch('OPENAI_API_KEY', nil)
16
16
 
17
17
  # Setup Anthropic
@@ -24,8 +24,5 @@ Soka::Rails.configure do |config|
24
24
  config.performance do |perf|
25
25
  # Maximum iterations for ReAct loop
26
26
  perf.max_iterations = Rails.env.production? ? 10 : 5
27
-
28
- # Timeout for agent execution (in seconds)
29
- perf.timeout = 30
30
27
  end
31
28
  end
@@ -31,7 +31,6 @@ module Soka
31
31
  subclass.model config.ai_model if config.ai_model
32
32
  subclass.api_key config.ai_api_key if config.ai_api_key
33
33
  subclass.max_iterations config.max_iterations if config.max_iterations
34
- subclass.timeout config.timeout if config.timeout
35
34
  end
36
35
  end
37
36
  end
@@ -4,17 +4,16 @@ module Soka
4
4
  module Rails
5
5
  # Main configuration class for Soka Rails settings
6
6
  class Configuration
7
- attr_accessor :ai_provider, :ai_model, :ai_api_key, :max_iterations, :timeout
7
+ attr_accessor :ai_provider, :ai_model, :ai_api_key, :max_iterations
8
8
 
9
9
  def initialize
10
10
  # Use ENV.fetch to set default values
11
11
  @ai_provider = ENV.fetch('SOKA_PROVIDER', :gemini).to_sym
12
- @ai_model = ENV.fetch('SOKA_MODEL', 'gemini-2.0-flash-exp')
12
+ @ai_model = ENV.fetch('SOKA_MODEL', 'gemini-2.5-flash-lite')
13
13
  @ai_api_key = ENV.fetch('SOKA_API_KEY', nil)
14
14
 
15
15
  # Performance settings
16
16
  @max_iterations = defined?(::Rails) && ::Rails.env.production? ? 10 : 5
17
- @timeout = 30
18
17
  end
19
18
 
20
19
  # DSL configuration methods
@@ -55,10 +54,6 @@ module Soka
55
54
  def max_iterations=(value)
56
55
  @config.max_iterations = value
57
56
  end
58
-
59
- def timeout=(value)
60
- @config.timeout = value.is_a?(Numeric) ? value : value.to_i
61
- end
62
57
  end
63
58
  end
64
59
  end
@@ -42,13 +42,6 @@ module Soka
42
42
  end
43
43
  end
44
44
 
45
- # Raised when agent execution exceeds the configured timeout
46
- class AgentTimeoutError < AgentError
47
- def initialize(timeout)
48
- super("Agent execution timeout after #{timeout} seconds")
49
- end
50
- end
51
-
52
45
  # Raised when agent exceeds maximum allowed iterations
53
46
  class MaxIterationsExceededError < AgentError
54
47
  def initialize(max_iterations)
@@ -80,7 +80,6 @@ module Soka
80
80
  Soka::Rails.configure do |config|
81
81
  config.ai_provider = :mock
82
82
  config.max_iterations = 3
83
- config.timeout = 5
84
83
  yield config if block_given?
85
84
  end
86
85
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Soka
4
4
  module Rails
5
- VERSION = '0.0.5'
5
+ VERSION = '0.0.6'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: soka-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - jiunjiun
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-08-05 00:00:00.000000000 Z
11
+ date: 2025-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -36,14 +36,14 @@ dependencies:
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: 0.0.5
39
+ version: 0.0.6
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: 0.0.5
46
+ version: 0.0.6
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: zeitwerk
49
49
  requirement: !ruby/object:Gem::Requirement