跳到主要内容
丁雪峰
English

交互式讲解

neutrix

neutrix 是一个面向复杂科研任务的终端 AI 智能体。它通过单一 OpenAI 客户端与 DeepSeek、GLM 和 Claude(经 IHEP 网关)对话,使用工具读取与修改代码,并把对话保留在普通的终端回滚缓冲区中。

两个模型档位

fast / strong,在对话中用 /fast、/strong 切换。

多模型接入

DeepSeek、GLM 与 Claude,统一 OpenAI 客户端。

内置工具

read_file、write_file、list_dir、run_shell。

异步提示队列

响应进行时仍可继续输入。

neutrix

·neutrix · strong slot → ihep/anthropic/claude-opus · tools: on

why is tests/test_executor.py::test_submit_timeout flaky? propose a fix.

read_file(tests/test_executor.py) → 142 lines

run_shell(pytest -q tests/test_executor.py) → 1 failed, 7 passed

The race is in Executor.submit(): the worker can finish before the

main thread registers the future, so the 0.1s timeout occasionally wins.

/fast

·switched → ihep/anthropic/claude-haiku (fast slot)

apply the fix and re-run.

write_file(src/neutrix/executor.py) → patched submit() (+6 −2)

run_shell(pytest -q tests/test_executor.py) → 8 passed

Fixed: register the future before dispatching, and bump the join timeout.

一个典型会话——调试不稳定的测试、切换模型档位并应用修复。

pip install neutrix 源码 ↗