opencode-swarm 6.85.4 → 6.86.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.
package/dist/cli/index.js CHANGED
@@ -18973,6 +18973,7 @@ for (const [agentName, tools] of Object.entries(AGENT_TOOL_MAP)) {
18973
18973
  // src/config/schema.ts
18974
18974
  var AgentOverrideConfigSchema = exports_external.object({
18975
18975
  model: exports_external.string().optional(),
18976
+ variant: exports_external.string().min(1).optional(),
18976
18977
  temperature: exports_external.number().min(0).max(2).optional(),
18977
18978
  disabled: exports_external.boolean().optional(),
18978
18979
  fallback_models: exports_external.array(exports_external.string()).max(3).optional()
@@ -16,6 +16,7 @@ import { z } from 'zod';
16
16
  export declare function stripKnownSwarmPrefix(agentName: string): string;
17
17
  export declare const AgentOverrideConfigSchema: z.ZodObject<{
18
18
  model: z.ZodOptional<z.ZodString>;
19
+ variant: z.ZodOptional<z.ZodString>;
19
20
  temperature: z.ZodOptional<z.ZodNumber>;
20
21
  disabled: z.ZodOptional<z.ZodBoolean>;
21
22
  fallback_models: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -25,6 +26,7 @@ export declare const SwarmConfigSchema: z.ZodObject<{
25
26
  name: z.ZodOptional<z.ZodString>;
26
27
  agents: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
27
28
  model: z.ZodOptional<z.ZodString>;
29
+ variant: z.ZodOptional<z.ZodString>;
28
30
  temperature: z.ZodOptional<z.ZodNumber>;
29
31
  disabled: z.ZodOptional<z.ZodBoolean>;
30
32
  fallback_models: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -627,6 +629,7 @@ export type ParallelizationConfig = z.infer<typeof ParallelizationConfigSchema>;
627
629
  export declare const PluginConfigSchema: z.ZodObject<{
628
630
  agents: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
629
631
  model: z.ZodOptional<z.ZodString>;
632
+ variant: z.ZodOptional<z.ZodString>;
630
633
  temperature: z.ZodOptional<z.ZodNumber>;
631
634
  disabled: z.ZodOptional<z.ZodBoolean>;
632
635
  fallback_models: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -635,6 +638,7 @@ export declare const PluginConfigSchema: z.ZodObject<{
635
638
  name: z.ZodOptional<z.ZodString>;
636
639
  agents: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
637
640
  model: z.ZodOptional<z.ZodString>;
641
+ variant: z.ZodOptional<z.ZodString>;
638
642
  temperature: z.ZodOptional<z.ZodNumber>;
639
643
  disabled: z.ZodOptional<z.ZodBoolean>;
640
644
  fallback_models: z.ZodOptional<z.ZodArray<z.ZodString>>;
package/dist/index.js CHANGED
@@ -14721,6 +14721,7 @@ var init_schema = __esm(() => {
14721
14721
  SEPARATORS = ["_", "-", " "];
14722
14722
  AgentOverrideConfigSchema = exports_external.object({
14723
14723
  model: exports_external.string().optional(),
14724
+ variant: exports_external.string().min(1).optional(),
14724
14725
  temperature: exports_external.number().min(0).max(2).optional(),
14725
14726
  disabled: exports_external.boolean().optional(),
14726
14727
  fallback_models: exports_external.array(exports_external.string()).max(3).optional()
@@ -57641,11 +57642,27 @@ function getTemperatureOverride(agentName, swarmAgents, swarmPrefix) {
57641
57642
  const baseAgentName = stripSwarmPrefix(agentName, swarmPrefix);
57642
57643
  return swarmAgents?.[baseAgentName]?.temperature;
57643
57644
  }
57645
+ function getVariantOverride(agentName, swarmAgents, swarmPrefix) {
57646
+ const baseAgentName = stripSwarmPrefix(agentName, swarmPrefix);
57647
+ return swarmAgents?.[baseAgentName]?.variant;
57648
+ }
57644
57649
  function applyOverrides(agent, swarmAgents, swarmPrefix) {
57645
57650
  const tempOverride = getTemperatureOverride(agent.name, swarmAgents, swarmPrefix);
57646
57651
  if (tempOverride !== undefined) {
57647
57652
  agent.config.temperature = tempOverride;
57648
57653
  }
57654
+ const variantOverride = getVariantOverride(agent.name, swarmAgents, swarmPrefix);
57655
+ const modelSegments = agent.config.model?.split("/") ?? [];
57656
+ if (modelSegments.length >= 3) {
57657
+ const autoVariant = modelSegments[modelSegments.length - 1];
57658
+ const cleanedModel = modelSegments.slice(0, -1).join("/");
57659
+ const effectiveVariant = variantOverride ?? autoVariant;
57660
+ console.warn(`[swarm] Deprecation: model "${agent.config.model}" embeds variant. ` + `Use "model": "${cleanedModel}", "variant": "${effectiveVariant}" instead.`);
57661
+ agent.config.model = cleanedModel;
57662
+ agent.config.variant = effectiveVariant;
57663
+ } else if (variantOverride !== undefined) {
57664
+ agent.config.variant = variantOverride;
57665
+ }
57649
57666
  return agent;
57650
57667
  }
57651
57668
  function createSwarmAgents(swarmId, swarmConfig, isDefault, pluginConfig) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "6.85.4",
3
+ "version": "6.86.0",
4
4
  "description": "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",