v3.38.8

ruvnet/ruflov3.38.8Aug 12, 2026by ruvnet

AI Summary

Addresses a configuration propagation failure where explicit provider and model settings were ignored during agent execution, causing silent failures or incorrect defaults.

Key Highlights

  • Explicit provider/model config now propagates into agent execution
  • `determineAgentModel()` treats non-alias strings as explicit selections
  • `agent_spawn` forwards explicit provider choices to the agent record
  • `callAnthropicMessages()` checks persisted config for keys when env vars are absent

Full Release Notes

## Highlights

- **fix(agent):** explicit provider/model config now propagates into agent execution (#2962, PR #3007)

`providers configure` and `agent spawn --provider/--model` previously persisted user intent but the execution path (`callAnthropicMessages`, `executeAgentTask`, `determineAgentModel`) only ever consulted env vars and a fixed 5-alias model list — silently discarding both. A user who configured local Ollama or OpenRouter would see two successful CLI commands, then execution would either fail closed or silently use a different provider/model than requested.

- `determineAgentModel()` now treats any non-alias `config.model` string (e.g. an Ollama tag) as an explicit selection via the existing `modelId` fast-path, instead of falling through to task-based routing / agent-type defaults.
- `agent_spawn` forwards `config.provider` into the stored (and returned) agent record when it's an unambiguous explicit choice (`ollama`/`openrouter`; `anthropic` is excluded since the CLI silently defaults to it when `--provider` isn't passed).
- `callAnthropicMessages()` now consults the persisted `agents.providers` config for `baseUrl`/`apiKey`/`model` when env vars are absent. A self-hosted, unauthenticated Ollama endpoint no longer requires the undocumented `OLLAMA_API_KEY=local` sentinel.
- `executeAgentTask()` forwards the agent's explicit provider into the first dispatch call.

**Precedence** (resolving the open design question from the issue thread, credit @pacphi): explicit per-agent flag → env vars → persisted `agents.providers` config → key-presence inference (unchanged, last resort).

Regression coverage: `v3/@claude-flow/cli/__tests__/agent-provider-model-propagation.test.ts` (3 tests, each verified to fail against the pre-fix code and pass against the fix).

## Verification

- TypeScript clean (`tsc --noEmit`)
- 202/209 existing tests green for touched files (7 pre-existing unrelated failures confirmed present on unpatched `main` too — stale `fs` mock in `mcp-tools-deep.test.ts`)
- CI: 107 checks passed, 3 skipped (conditional), 0 failed
- Tarball-verified: fix present in the published `@claude-flow/cli@3.38.8` package