claude_swarm 1.0.7 → 1.0.8

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: 9c8e0f8bb459a909a37216a620952bf08315a2943216865bee2890cd870bbd1c
4
- data.tar.gz: 73315162dc30338385e89423fd9c509ab051b4caf4dbb0ba1d8ebbb681bbc3b2
3
+ metadata.gz: cb4d46c1724d7488d304465b03250af098e1db3c2f73005cdb48c1092920628f
4
+ data.tar.gz: '031668b2d8abfcddf0fae98e14364259c7a8d66bbb201a67eba7a58063203a7a'
5
5
  SHA512:
6
- metadata.gz: 4ca20259cbe8dc8ac5b9a0b7adb2c7454af0e375e6d397e52407a991b0690dffe8c4365c37f9b3653c1f0c38dce7af4bb3afeca0151d5ba3b8185276355ca500
7
- data.tar.gz: 97d0b2aa55a3df7178ff0bc25b923403402e6fd08f7b15a517c6aa775bd4dca1c9983a0bcaa392186844d684459f63c357aa1aba92ad09db5e83d791d54d0031
6
+ metadata.gz: b1187c0f7a3f73d65832e83236a4c17967835bd70764fd782111e4b80fe20ad61c9dd0ab7c4c3bec755df387e1221597695302a05c3044dca427b08c40da7a1a
7
+ data.tar.gz: b5242fd046e72ced817feab59b628d8013c8b674ddee698b99f32a87936acc5a470d007a16dcdbea0a75656a238099380aa261022fa5e75be08b8c0b51e9d5a2
data/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
1
+ ## [1.0.8]
2
+
3
+ ### Changed
4
+ - **Removed model-specific parameter restrictions for OpenAI**: Simplified parameter handling by allowing OpenAI's API to validate parameters instead of enforcing client-side restrictions
5
+ - Removed validation that prevented using `temperature` with o-series models
6
+ - Removed validation that restricted `reasoning_effort` to only o-series models
7
+ - Eliminated `O_SERIES_MODEL_PATTERN` constant and related model pattern matching logic
8
+ - Parameters are now passed to the API as-is when provided, allowing flexibility as OpenAI's model capabilities evolve
9
+ - Reduces maintenance burden when new models are released
10
+ - API errors provide authoritative feedback for invalid parameter combinations
11
+
12
+ ### Fixed
13
+
1
14
  ## [1.0.7]
2
15
 
3
16
  ### Fixed
data/docs/v1/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/claude_swarm.svg?cache_bust1=1.0.1)](https://badge.fury.io/rb/claude_swarm)
4
4
  [![CI](https://github.com/parruda/claude-swarm/actions/workflows/ci.yml/badge.svg)](https://github.com/parruda/claude-swarm/actions/workflows/ci.yml)
5
+ [![Mentioned in Awesome Claude Code](https://awesome.re/mentioned-badge-flat.svg)](https://github.com/hesreallyhim/awesome-claude-code)
6
+
5
7
 
6
8
  > **Note**: This is the documentation for Claude Swarm v1, which uses a multi-process architecture with Claude Code instances. For new projects, we recommend using [SwarmSDK v2](../v2/README.md) which offers a single-process architecture, better performance, and more features.
7
9
 
@@ -181,14 +181,6 @@ module ClaudeSwarm
181
181
  exit(1)
182
182
  end
183
183
 
184
- # Validate it's used with an o-series model
185
- model = options[:model]
186
- unless model&.match?(ClaudeSwarm::Configuration::O_SERIES_MODEL_PATTERN)
187
- error("reasoning_effort is only supported for o-series models (o1, o1 Preview, o1-mini, o1-pro, o3, o3-mini, o3-pro, o3-deep-research, o4-mini, o4-mini-deep-research, etc.)")
188
- error("Current model: #{model}")
189
- exit(1)
190
- end
191
-
192
184
  # Validate the value
193
185
  unless ClaudeSwarm::Configuration::VALID_REASONING_EFFORTS.include?(options[:reasoning_effort])
194
186
  error("reasoning_effort must be 'low', 'medium', or 'high'")
@@ -196,16 +188,6 @@ module ClaudeSwarm
196
188
  end
197
189
  end
198
190
 
199
- # Validate temperature is not used with o-series models
200
- if options[:temperature] && options[:provider] == "openai"
201
- model = options[:model]
202
- if model&.match?(ClaudeSwarm::Configuration::O_SERIES_MODEL_PATTERN)
203
- error("temperature parameter is not supported for o-series models (#{model})")
204
- error("O-series models use deterministic reasoning and don't accept temperature settings")
205
- exit(1)
206
- end
207
- end
208
-
209
191
  instance_config = {
210
192
  name: options[:name],
211
193
  directory: options[:directory],
@@ -11,8 +11,6 @@ module ClaudeSwarm
11
11
  # Regex patterns
12
12
  ENV_VAR_PATTERN = /\$\{([^}]+)\}/
13
13
  ENV_VAR_WITH_DEFAULT_PATTERN = /\$\{([^:}]+)(:=([^}]*))?\}/
14
- O_SERIES_MODEL_PATTERN = /^(o\d+(\s+(Preview|preview))?(-pro|-mini|-deep-research|-mini-deep-research)?|gpt-5(-mini|-nano)?)$/
15
-
16
14
  attr_reader :config, :config_path, :swarm, :swarm_name, :main_instance, :instances, :base_dir
17
15
 
18
16
  def initialize(config_path, base_dir: nil, options: {})
@@ -165,7 +163,6 @@ module ClaudeSwarm
165
163
 
166
164
  # Parse provider (optional, defaults to claude)
167
165
  provider = config["provider"]
168
- model = config["model"]
169
166
 
170
167
  # Validate provider value if specified
171
168
  if provider && !VALID_PROVIDERS.include?(provider)
@@ -183,17 +180,6 @@ module ClaudeSwarm
183
180
  unless VALID_REASONING_EFFORTS.include?(config["reasoning_effort"])
184
181
  raise Error, "Instance '#{name}' has invalid reasoning_effort '#{config["reasoning_effort"]}'. Must be 'low', 'medium', or 'high'"
185
182
  end
186
-
187
- # Validate it's only used with o-series or gpt-5 models
188
- # Support patterns like: o1, o1-mini, o1-pro, o1 Preview, o3-deep-research, o4-mini-deep-research, gpt-5, gpt-5-mini, gpt-5-nano, etc.
189
- unless model&.match?(O_SERIES_MODEL_PATTERN)
190
- raise Error, "Instance '#{name}' has reasoning_effort but model '#{model}' is not an o-series or gpt-5 model (o1, o1 Preview, o1-mini, o1-pro, o3, o3-mini, o3-pro, o3-deep-research, o4-mini, o4-mini-deep-research, gpt-5, gpt-5-mini, gpt-5-nano, etc.)"
191
- end
192
- end
193
-
194
- # Validate temperature is not used with o-series or gpt-5 models when provider is openai
195
- if provider == "openai" && config["temperature"] && model&.match?(O_SERIES_MODEL_PATTERN)
196
- raise Error, "Instance '#{name}' has temperature parameter but model '#{model}' is an o-series or gpt-5 model. O-series and gpt-5 models use deterministic reasoning and don't accept temperature settings"
197
183
  end
198
184
 
199
185
  # Validate OpenAI-specific fields only when provider is not "openai"
@@ -67,17 +67,8 @@ module ClaudeSwarm
67
67
  messages: messages,
68
68
  }
69
69
 
70
- # Only add temperature for non-o-series models
71
- # O-series models don't support temperature parameter
72
- if @temperature && !@model.match?(ClaudeSwarm::Configuration::O_SERIES_MODEL_PATTERN)
73
- parameters[:temperature] = @temperature
74
- end
75
-
76
- # Only add reasoning_effort for o-series models
77
- # reasoning_effort is only supported by o-series models: o1, o1 Preview, o1-mini, o1-pro, o3, o3-mini, o3-pro, o3-deep-research, o4-mini, o4-mini-deep-research, etc.
78
- if @reasoning_effort && @model.match?(ClaudeSwarm::Configuration::O_SERIES_MODEL_PATTERN)
79
- parameters[:reasoning_effort] = @reasoning_effort
80
- end
70
+ parameters[:temperature] = @temperature if @temperature
71
+ parameters[:reasoning_effort] = @reasoning_effort if @reasoning_effort
81
72
 
82
73
  # Add tools if available
83
74
  parameters[:tools] = @mcp_client.to_openai_tools if @available_tools&.any? && @mcp_client
@@ -46,17 +46,8 @@ module ClaudeSwarm
46
46
  model: @model,
47
47
  }
48
48
 
49
- # Only add temperature for non-o-series models
50
- # O-series models don't support temperature parameter
51
- unless @model.match?(ClaudeSwarm::Configuration::O_SERIES_MODEL_PATTERN)
52
- parameters[:temperature] = @temperature
53
- end
54
-
55
- # Only add reasoning effort for o-series models
56
- # reasoning is only supported by o-series models: o1, o1 Preview, o1-mini, o1-pro, o3, o3-mini, o3-pro, o3-deep-research, o4-mini, o4-mini-deep-research, etc.
57
- if @reasoning_effort && @model.match?(ClaudeSwarm::Configuration::O_SERIES_MODEL_PATTERN)
58
- parameters[:reasoning] = { effort: @reasoning_effort }
59
- end
49
+ parameters[:temperature] = @temperature if @temperature
50
+ parameters[:reasoning] = { effort: @reasoning_effort } if @reasoning_effort
60
51
 
61
52
  # On first call, use string input (can include system prompt)
62
53
  # On subsequent calls with function results, use array input
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ClaudeSwarm
4
- VERSION = "1.0.7"
4
+ VERSION = "1.0.8"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: claude_swarm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paulo Arruda