TestRunLLM_RequiresRunAgent pins the contract that a missing RunAgent callback is rejected loudly rather than silently no-oping.
(t *testing.T)
| 520 | // TestRunLLM_RequiresRunAgent pins the contract that a missing RunAgent |
| 521 | // callback is rejected loudly rather than silently no-oping. |
| 522 | func TestRunLLM_RequiresRunAgent(t *testing.T) { |
| 523 | t.Parallel() |
| 524 | |
| 525 | sess := session.New() |
| 526 | a := agent.New("test", "test") |
| 527 | |
| 528 | _, err := RunLLM(t.Context(), LLMArgs{ |
| 529 | Session: sess, |
| 530 | Agent: a, |
| 531 | ContextLimit: 100_000, |
| 532 | // RunAgent intentionally nil |
| 533 | }) |
| 534 | require.Error(t, err) |
| 535 | assert.Contains(t, err.Error(), "RunAgent") |
| 536 | } |
| 537 | |
| 538 | // TestRunLLM_RequiresContextLimit pins that the LLM strategy refuses |
| 539 | // to run without a real context budget — it would otherwise feed an |