DeepSeek-Reasonix icon indicating copy to clipboard operation
DeepSeek-Reasonix copied to clipboard

[Bug]: ACP session/new rejects model from spawned process — "model not configured" when called by Open Design

Open want2knoww opened this issue 5 months ago • 1 comments

Version line

v2 — Go rewrite (1.x), main-v2 (active development)

Exact version

npm-v1.11.1-rc.1

What happened?

When Open Design spawns reasonix acp as a child process and calls session/new, Reasonix returns:

json-rpc id 2: session/new: model "deepseek-flash" is not configured

The error mentions "deepseek-flash" (a provider name from config.toml), not a model ID. The caller sends the correct full model ID (deepseek-flash/deepseek-v4-flash).

Key evidence:

  1. Correct model ID is being sent - confirmed by caller run events
  2. Running reasonix acp directly from terminal always succeeds - only fails when spawned by another process
  3. Same error regardless of mcpServers, cwd, or REASONIX_ACP_SYSTEM_APPEND

I expected session/new to succeed regardless of how Reasonix is spawned.

Steps to reproduce

  1. Configure ~/.reasonix/config.toml with DeepSeek API providers and default_model = "deepseek/deepseek-v4-flash"
  2. Verify reasonix acp from terminal: pipe initialize + session/new → succeeds
  3. Spawn reasonix acp from another process with same messages → fails with "model deepseek-flash is not configured"
  4. Full repro: Open Design → Settings → Execution → DeepSeek Reasonix → Test

OS / platform

Windows 10

Relevant logs or output


want2knoww avatar Jun 24 '26 12:06 want2knoww

Root cause identified (with fix) When Reasonix is spawned as a child process (e.g. by Open Design), config.LoadForRoot() → userConfigLoadPath() → reasonixHomeDir() may fail to locate the user's config.toml, falling back to built-in defaults where DefaultModel = "deepseek-flash". The built-in provider has no API key → Configured() returns false → model "deepseek-flash" is not configured.

Reproduction Spawn reasonix acp from Node.js child_process.spawn with minimal env Send session/new — fails with model "deepseek-flash" is not configured Same session/new from terminal works fine Workaround Set REASONIX_HOME env var to the config directory before spawning. For Open Design, the fix was adding REASONIX_HOME to the agent def's env block (nexu-io/open-design#4741).

Suggested fix Reasonix could improve child-process config discovery: if userConfigLoadPath() returns empty or the file isn't found through the normal resolution path, try os.UserConfigDir() / os.UserHomeDir() as additional fallbacks before falling back to built-in defaults.

want2knoww avatar Jun 24 '26 15:06 want2knoww

Thanks for the detailed repro and root-cause notes.

This was fixed by #5304, merged in 5e7cdac33e03402c423130ecfb2aafb409411db1. Reasonix now keeps the existing precedence (REASONIX_HOME first, then the normal Windows config dir) and adds a Windows fallback to %USERPROFILE%\AppData\Roaming\reasonix when the OS config directory lookup is unavailable. That prevents ACP child-process launches from silently falling back to built-in defaults and then reporting model "deepseek-flash" is not configured even though the user's config exists.

Verification passed on the PR, including the Windows CI job, race/lint/coverage checks, and the focused config/ACP/boot test suites.

Release note: this merge is not included in the currently published v1.12.0 / desktop-v1.12.0 releases, so users on those builds still need the REASONIX_HOME workaround until the next release or a build from main-v2 includes the fix.

SivanCola avatar Jun 27 '26 18:06 SivanCola