@@ -17,7 +17,7 @@ func TestExecutionControlsPreserveNativeDefaultsAndInstructions(t *testing.T) {
1717 root := t .TempDir ()
1818 t .Setenv ("OAC_RUNTIME_HOME" , root )
1919 config := Config {Entrypoint : filepath .Join (root , "worker" ), StateDir : filepath .Join (root , "state" )}
20- request := proto.PromptRequestPayload {RunID : "run" , Input : proto .TextInput ("Original input." ), AgentSessionID : "native-session" , AgentOptions : map [ string ] any { "model" : "native-model" , "system_prompt" : "Keep these exact instructions.\n Do not replace them." }}
20+ request := proto.PromptRequestPayload {RunID : "run" , Input : proto .TextInput ("Original input." ), AgentSessionID : "native-session" , Turn : proto. TurnSettings { Model : "native-model" }, AgentOptions : map [ string ] any { "system_prompt" : "Keep these exact instructions.\n Do not replace them." }}
2121 ordinary , _ , err := prepareConfiguration (config , request )
2222 if err != nil {
2323 t .Fatal (err )
@@ -49,7 +49,7 @@ func TestLiveWebSearchReachesTheBridgeOnEveryPlacement(t *testing.T) {
4949 root := t .TempDir ()
5050 t .Setenv ("OAC_RUNTIME_HOME" , root )
5151 none , _ , err := prepareConfiguration (Config {Entrypoint : filepath .Join (root , "worker" ), StateDir : filepath .Join (root , "state" )}, proto.PromptRequestPayload {
52- RunID : "run" , Input : proto .TextInput ("Search." ), ExecutionControls : live , AgentOptions : map [ string ] any { "model" : "native-model" }})
52+ RunID : "run" , Input : proto .TextInput ("Search." ), ExecutionControls : live , Turn : proto. TurnSettings { Model : "native-model" }, AgentOptions : map [ string ] any { }})
5353 if err != nil || none .WebSearch != "live" {
5454 t .Fatal ("live search on environment none did not reach the bridge" , err )
5555 }
@@ -63,23 +63,24 @@ func TestLiveWebSearchReachesTheBridgeOnEveryPlacement(t *testing.T) {
6363
6464func TestExecutionControlsRejectUnsupportedProfilesBeforeLaunch (t * testing.T ) {
6565 enabled := true
66- cases := map [string ]proto.ExecutionControls {
67- "cached-search" : {WebSearch : & proto.WebSearchControl {Mode : "cached" , ContextSize : "medium" }},
68- "enabled-ptc" : {ProgrammaticToolCalling : & enabled },
69- "low-verbosity" : {TextVerbosity : "low" },
70- "high-verbosity" : {TextVerbosity : "high" },
71- "unknown-verbosity" : {TextVerbosity : "invalid" },
72- "no-effort" : {ReasoningEffort : "none" },
73- "minimal-effort" : {ReasoningEffort : "minimal" },
74- "summary" : {ReasoningSummary : "concise" },
75- "service-tier" : {ServiceTier : "priority" },
76- }
77- for name , controls := range cases {
66+ model := proto.TurnSettings {Model : "native-model" }
67+ cases := map [string ]proto.PromptRequestPayload {
68+ "cached-search" : {Turn : model , ExecutionControls : & proto.ExecutionControls {WebSearch : & proto.WebSearchControl {Mode : "cached" , ContextSize : "medium" }}},
69+ "enabled-ptc" : {Turn : model , ExecutionControls : & proto.ExecutionControls {ProgrammaticToolCalling : & enabled }},
70+ "low-verbosity" : {Turn : model , ExecutionControls : & proto.ExecutionControls {TextVerbosity : "low" }},
71+ "high-verbosity" : {Turn : model , ExecutionControls : & proto.ExecutionControls {TextVerbosity : "high" }},
72+ "unknown-verbosity" : {Turn : model , ExecutionControls : & proto.ExecutionControls {TextVerbosity : "invalid" }},
73+ "summary" : {Turn : model , ExecutionControls : & proto.ExecutionControls {ReasoningSummary : "concise" }},
74+ "no-effort" : {Turn : proto.TurnSettings {Model : "native-model" , ReasoningEffort : "none" }},
75+ "minimal-effort" : {Turn : proto.TurnSettings {Model : "native-model" , ReasoningEffort : "minimal" }},
76+ "service-tier" : {Turn : proto.TurnSettings {Model : "native-model" , ServiceTier : "priority" }},
77+ }
78+ for name , request := range cases {
7879 t .Run (name , func (t * testing.T ) {
7980 root := t .TempDir ()
8081 t .Setenv ("OAC_RUNTIME_HOME" , root )
8182 config := Config {Node : "must-not-run" , Entrypoint : filepath .Join (root , "worker" ), StateDir : filepath .Join (root , "state" )}
82- request := proto. PromptRequestPayload { RunID : "run" , Input : proto .TextInput ("Original input." ), ExecutionControls : & controls , AgentOptions : map [ string ] any { "model" : "native-model" }}
83+ request . RunID , request . Input = "run" , proto .TextInput ("Original input." )
8384 _ , err := startSingleTurn (t .Context (), config , request , make (chan proto.Envelope , 1 ))
8485 if err == nil || ! strings .Contains (err .Error (), "not supported by this Harness" ) {
8586 t .Fatal ("unsupported controls did not fail at admission" , err )
@@ -96,7 +97,7 @@ func TestReasoningEffortReachesNativeOptions(t *testing.T) {
9697 t .Setenv ("OAC_RUNTIME_HOME" , root )
9798 config := Config {Entrypoint : filepath .Join (root , "worker" ), StateDir : filepath .Join (root , "state" )}
9899 for _ , effort := range []string {"low" , "medium" , "high" , "xhigh" , "max" } {
99- request := proto.PromptRequestPayload {RunID : "run" , Input : proto .TextInput ("hello" ), ExecutionControls : & proto.ExecutionControls {TextVerbosity : "medium" , ReasoningEffort : effort }, AgentOptions : map [string ]any {"model" : "native-model" , "harness_config" : map [string ]any {"thinking" : map [string ]any {"type" : "adaptive" }}}}
100+ request := proto.PromptRequestPayload {RunID : "run" , Input : proto .TextInput ("hello" ), ExecutionControls : & proto.ExecutionControls {TextVerbosity : "medium" }, Turn : proto. TurnSettings { Model : "native-model" , ReasoningEffort : effort }, AgentOptions : map [string ]any {"harness_config" : map [string ]any {"thinking" : map [string ]any {"type" : "adaptive" }}}}
100101 start , _ , err := prepareConfiguration (config , request )
101102 if err != nil {
102103 t .Fatal (effort , err )
@@ -127,7 +128,7 @@ func TestStructuredOutputConfigurationReachesNativeUnchanged(t *testing.T) {
127128 t .Setenv ("OAC_RUNTIME_HOME" , root )
128129 config := Config {Entrypoint : filepath .Join (root , "worker" ), StateDir : filepath .Join (root , "state" )}
129130 schema := json .RawMessage (`{"type":"object","properties":{"n":{"const":9007199254740992}}}` )
130- request := proto.PromptRequestPayload {RunID : "run" , Input : proto .TextInput ("Original input." ), DisableSubagents : true , AgentOptions : map [ string ] any { "model" : "model" , "system_prompt" : "Original instructions." }, ExecutionControls : & proto.ExecutionControls {TextVerbosity : "medium" , OutputFormat : & proto.OutputFormat {Type : "json_schema" , Schema : schema }}}
131+ request := proto.PromptRequestPayload {RunID : "run" , Input : proto .TextInput ("Original input." ), DisableSubagents : true , Turn : proto. TurnSettings { Model : "model" }, AgentOptions : map [ string ] any { "system_prompt" : "Original instructions." }, ExecutionControls : & proto.ExecutionControls {TextVerbosity : "medium" , OutputFormat : & proto.OutputFormat {Type : "json_schema" , Schema : schema }}}
131132 start , _ , err := prepareConfiguration (config , request )
132133 if err != nil {
133134 t .Fatal (err )
@@ -151,7 +152,7 @@ func TestToolDiscoveryPreservesFrozenFunctionsBesideOtherProfiles(t *testing.T)
151152 root := t .TempDir ()
152153 t .Setenv ("OAC_RUNTIME_HOME" , root )
153154 config := Config {Entrypoint : filepath .Join (root , "worker" ), StateDir : filepath .Join (root , "state" )}
154- request := proto.PromptRequestPayload {RunID : "run" , Input : proto .TextInput ("Original input." ), DisableSubagents : true , ToolSearch : true , AgentOptions : map [string ]any {"model" : "model" }, FunctionTools : []proto.FunctionTool {
155+ request := proto.PromptRequestPayload {RunID : "run" , Input : proto .TextInput ("Original input." ), DisableSubagents : true , ToolSearch : true , Turn : proto. TurnSettings { Model : "model" }, AgentOptions : map [string ]any {}, FunctionTools : []proto.FunctionTool {
155156 {Name : "lookup" , Description : "Lookup" , Parameters : json .RawMessage (`{"type":"object","properties":{"ticket":{"const":"original"}}}` ), DeferLoading : true },
156157 {Name : "clock" , Description : "Clock" , Parameters : json .RawMessage (`{"type":"object"}` )},
157158 }}
@@ -174,7 +175,7 @@ func TestReasoningSummaryReachesTheBridgeOnlyWhenRequested(t *testing.T) {
174175 root := t .TempDir ()
175176 t .Setenv ("OAC_RUNTIME_HOME" , root )
176177 config := Config {Entrypoint : filepath .Join (root , "worker" ), StateDir : filepath .Join (root , "state" )}
177- request := proto.PromptRequestPayload {RunID : "run" , Input : proto .TextInput ("Input." ), AgentOptions : map [ string ] any { "model" : "native-model" }}
178+ request := proto.PromptRequestPayload {RunID : "run" , Input : proto .TextInput ("Input." ), Turn : proto. TurnSettings { Model : "native-model" }, AgentOptions : map [ string ] any { }}
178179 for _ , summary := range []string {"" , "auto" } {
179180 request .ExecutionControls = & proto.ExecutionControls {TextVerbosity : "medium" , ReasoningSummary : summary }
180181 start , _ , err := prepareConfiguration (config , request )
0 commit comments