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 +4 -4
- data/CHANGELOG.md +13 -0
- data/docs/v1/README.md +2 -0
- data/lib/claude_swarm/cli.rb +0 -18
- data/lib/claude_swarm/configuration.rb +0 -14
- data/lib/claude_swarm/openai/chat_completion.rb +2 -11
- data/lib/claude_swarm/openai/responses.rb +2 -11
- data/lib/claude_swarm/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cb4d46c1724d7488d304465b03250af098e1db3c2f73005cdb48c1092920628f
|
|
4
|
+
data.tar.gz: '031668b2d8abfcddf0fae98e14364259c7a8d66bbb201a67eba7a58063203a7a'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
[](https://badge.fury.io/rb/claude_swarm)
|
|
4
4
|
[](https://github.com/parruda/claude-swarm/actions/workflows/ci.yml)
|
|
5
|
+
[](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
|
|
data/lib/claude_swarm/cli.rb
CHANGED
|
@@ -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
|
-
|
|
71
|
-
|
|
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
|
-
|
|
50
|
-
|
|
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
|
data/lib/claude_swarm/version.rb
CHANGED