File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -183,16 +183,19 @@ def main() -> None:
183183 )
184184 report = orchestrator .run (game_profile )
185185 port = game_config .get ("port" )
186- if port is None :
187- raise ValueError (f"Game config for '{ args .game } ' is missing required 'port'" )
188- game_base_url = str (game_config .get ("base_url" ) or "" ).strip () or (
189- f"http://localhost:{ port } /api/agent"
190- )
191- frontend_url = str (
192- game_config .get ("frontend_url" )
193- or backend_spec .settings .get ("frontend_url" )
194- or f"http://localhost:{ port } "
186+ configured_frontend_url = str (
187+ game_config .get ("frontend_url" ) or backend_spec .settings .get ("frontend_url" ) or ""
195188 ).strip ()
189+ if port is None and not configured_frontend_url :
190+ raise ValueError (
191+ f"Game config for '{ args .game } ' must provide at least one of 'port' or 'frontend_url'"
192+ )
193+ game_base_url = str (game_config .get ("base_url" ) or "" ).strip ()
194+ if not game_base_url and port is not None :
195+ game_base_url = f"http://localhost:{ port } /api/agent"
196+ frontend_url = configured_frontend_url
197+ if not frontend_url and port is not None :
198+ frontend_url = f"http://localhost:{ port } "
196199 report .metadata ["llm" ] = {
197200 "model" : model ,
198201 "platform" : resolved_platform ,
You can’t perform that action at this time.
0 commit comments