fix(llm): strip inline <think> reasoning from Dahl/MiniMax streams; dedupe identical parallel tool calls; hermetic config tests

This commit is contained in:
OpenClaw Dev 2026-10-25 06:51:20 +01:00
parent 46d98502dd
commit 546a9315d5
6 changed files with 264 additions and 5 deletions

View file

@ -7,6 +7,7 @@ import (
)
func load(t *testing.T, yaml string) (Config, error) {
t.Helper()
t.Helper()
p := filepath.Join(t.TempDir(), "c.yaml")
os.WriteFile(p, []byte("auth_token: aaaaaaaaaaaaaaaaaaaa\n"+yaml), 0o600)
@ -74,3 +75,13 @@ func TestAllPresetsComplete(t *testing.T) {
}
}
}
// TestMain keeps tests hermetic when the developer shell has BYTECLAW_* or provider keys set.
func TestMain(m *testing.M) {
for _, k := range []string{"BYTECLAW_LISTEN", "BYTECLAW_DATA_DIR", "BYTECLAW_WORKSPACE", "BYTECLAW_LLM_PROVIDER",
"BYTECLAW_LLM_BASE_URL", "BYTECLAW_LLM_API_KEY", "BYTECLAW_LLM_MODEL", "BYTECLAW_ALLOWED_ORIGINS", "BYTECLAW_AUTH_TOKEN",
"OPENAI_API_KEY", "OPENROUTER_API_KEY", "DAHL_API_KEY", "GONKAROUTER_API_KEY"} {
os.Unsetenv(k)
}
os.Exit(m.Run())
}