🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
TypeScript agentic-aiagentic-frameworkagentic-workflowagentsai-agentsai-assistantai-skillsautonomous-agentsclaudecodexdsh-pluginharnessmcp-servermulti-agentmulti-agent-systemsnpmskillsswarmswarm-intelligencetypescript
fix(init): stop pinning a Claude model in generated .claude/settings.json (#3527)
Mr. Maka0cffd2760c7
diff --git a/.claude/settings.json b/.claude/settings.jsonindex 5f83a499eb..d5d45fff6a 100644--- a/.claude/settings.json+++ b/.claude/settings.json@@ -1,5 +1,4 @@{- "model": "claude-sonnet-5","skillListingBudgetFraction": 0.06,"customInstructions": "Follow the project's CLAUDE.md guidelines. Use concurrent execution for all operations. Prioritize v3 implementation with security-first development, 15-agent swarm coordination, phased performance optimization, and cross-platform helper automation.","env": {diff --git a/v3/@claude-flow/cli/__tests__/init-no-model-pin-3527.test.ts b/v3/@claude-flow/cli/__tests__/init-no-model-pin-3527.test.tsnew file mode 100644index 0000000000..a492295873--- /dev/null+++ b/v3/@claude-flow/cli/__tests__/init-no-model-pin-3527.test.ts@@ -0,0 +1,32 @@+/**+ * #3527: `ruflo init` must not pin a Claude model in the generated .claude/settings.json.+ *+ * Claude Code's project settings outrank the user's own settings, so a pinned+ * `model` silently overrides the model the user chose (for example the `opus`+ * alias, which resolves to the newest Opus). settings-generator.ts wrote+ * `settings.model = 'claude-sonnet-5'` into every freshly initialised project,+ * and the repo's own .claude/settings.json carried the same pin, so every ruflo+ * project quietly ran an older model.+ */+import { describe, expect, it } from 'vitest';+import { readFileSync } from 'node:fs';+import { fileURLToPath } from 'node:url';+import { generateSettings, generateSettingsJson } from '../src/init/settings-generator.js';+import { DEFAULT_INIT_OPTIONS } from '../src/init/types.js';++describe('ruflo init leaves the Claude model to the user', () => {+ it('generateSettings() writes no model key', () => {+ expect(generateSettings(DEFAULT_INIT_OPTIONS)).not.toHaveProperty('model');+ });++ it('the settings.json written by a fresh init or --force has no model key', () => {+ expect(JSON.parse(generateSettingsJson(DEFAULT_INIT_OPTIONS))).not.toHaveProperty('model');+ });++ it("the repo's own .claude/settings.json does not pin a model either", () => {+ const repoSettings = JSON.parse(+ readFileSync(fileURLToPath(new URL('../../../../.claude/settings.json', import.meta.url)), 'utf8'),+ );+ expect(repoSettings).not.toHaveProperty('model');+ });+});diff --git a/v3/@claude-flow/cli/src/init/settings-generator.ts b/v3/@claude-flow/cli/src/init/settings-generator.tsindex e0844a0783..823f723aa7 100644--- a/v3/@claude-flow/cli/src/init/settings-generator.ts+++ b/v3/@claude-flow/cli/src/init/settings-generator.ts@@ -59,9 +59,9 @@ export function generateSettings(options: InitOptions): object {};}- // Note: Claude Code expects 'model' to be a string, not an object- // Additional ruflo-specific model preferences live in claudeFlow.modelPreferences below- settings.model = 'claude-sonnet-5';+ // #3527: deliberately no settings.model. Project settings outrank the user's+ // own settings, so a pin here would silently override the model the user chose.+ // Ruflo's own routing preferences live in claudeFlow.modelPreferences below.// Add Agent Teams configuration (experimental feature)settings.env = {