mirror of
https://github.com/YspCoder/clawgo.git
synced 2026-05-02 11:08:58 +08:00
Release v1.0.2
This commit is contained in:
@@ -5,6 +5,13 @@ import "testing"
|
||||
func TestNormalizedViewProjectsCoreAndRuntime(t *testing.T) {
|
||||
cfg := DefaultConfig()
|
||||
cfg.Agents.Router.Enabled = true
|
||||
cfg.Models.Providers["openai"] = ProviderConfig{
|
||||
APIBase: "https://api.openai.com/v1",
|
||||
Models: []string{"gpt-5.4"},
|
||||
MaxTokens: 12288,
|
||||
Temperature: 0.35,
|
||||
TimeoutSec: 90,
|
||||
}
|
||||
cfg.Agents.Subagents["coder"] = SubagentConfig{
|
||||
Enabled: true,
|
||||
Role: "coding",
|
||||
@@ -27,4 +34,10 @@ func TestNormalizedViewProjectsCoreAndRuntime(t *testing.T) {
|
||||
if !view.Runtime.Router.Enabled || view.Runtime.Router.Strategy != "rules_first" {
|
||||
t.Fatalf("unexpected runtime router: %+v", view.Runtime.Router)
|
||||
}
|
||||
if got := view.Runtime.Providers["openai"].MaxTokens; got != 12288 {
|
||||
t.Fatalf("expected provider max_tokens in normalized runtime view, got %d", got)
|
||||
}
|
||||
if got := view.Runtime.Providers["openai"].Temperature; got != 0.35 {
|
||||
t.Fatalf("expected provider temperature in normalized runtime view, got %v", got)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user