newAgentNode builds an Agent node with a no-provider llmproxy client. The returned agent never invokes the runner during the tests below — only pure helpers (Setup / Outputs / applyStructuredOutputs / next) are exercised.
( id string, answer workflow.OutputBinding, decls []workflow.OutputDeclaration, )
| 24 | // The returned agent never invokes the runner during the tests below — only |
| 25 | // pure helpers (Setup / Outputs / applyStructuredOutputs / next) are exercised. |
| 26 | func newAgentNode( |
| 27 | id string, |
| 28 | answer workflowapi.OutputBinding, |
| 29 | decls []workflowapi.OutputDeclaration, |
| 30 | ) *Agent { |
| 31 | client, _ := llmproxy.NewClient(nil) |
| 32 | return NewAgent( |
| 33 | id, |
| 34 | "agent-"+id, |
| 35 | "test-model", |
| 36 | nil, // instructions |
| 37 | answer, |
| 38 | decls, |
| 39 | nil, // memoryRefs |
| 40 | nil, // maxTurns |
| 41 | "", // toolDescription |
| 42 | client, |
| 43 | nil, // memory manager |
| 44 | ) |
| 45 | } |
| 46 | |
| 47 | func TestChoiceToken(t *testing.T) { |
| 48 | assert.Equal(t, "choice_0", choiceToken(0)) |
no test coverage detected