Skip to content

Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous reasoning agent, and a self-maintaining Wiki.

492 B
Raw Blame
package handler

import (
	"encoding/json"
	"testing"

	"github.com/stretchr/testify/require"
)

func TestCreateAutomationPreservesModelOverride(t *testing.T) {
	var req CreateAutomationRequest
	require.NoError(t, json.Unmarshal([]byte(`{
		"name": "Digest", "instruction": "Summarize the news",
		"model_id": "selected-model",
		"trigger": {"type": "cron", "expr": "0 9 * * *"}
	}`), &req))
	require.NotNil(t, req.patch().ModelID)
	require.Equal(t, "selected-model", *req.patch().ModelID)
}