@@ -386,11 +386,6 @@ func createAgent(ctx context.Context, cmd *cli.Command) error {
386386 fmt .Printf ("Creating new agent\n " )
387387 }
388388
389- regions := cmd .StringSlice ("regions" )
390- if len (regions ) != 0 {
391- lkConfig .Agent .Regions = regions
392- }
393-
394389 secrets , err := requireSecrets (ctx , cmd , false , false )
395390 if err != nil {
396391 return err
@@ -419,9 +414,11 @@ func createAgent(ctx context.Context, cmd *cli.Command) error {
419414 }
420415 }
421416
417+ regions := cmd .StringSlice ("regions" )
418+
422419 req := & lkproto.CreateAgentRequest {
423420 Secrets : secrets ,
424- Regions : lkConfig . Agent . Regions ,
421+ Regions : regions ,
425422 }
426423
427424 resp , err := agentsClient .CreateAgent (ctx , req )
@@ -531,16 +528,10 @@ func createAgentConfig(ctx context.Context, cmd *cli.Command) error {
531528 return fmt .Errorf ("invalid project URL: %s" , project .URL )
532529 }
533530
534- var regions []string
535- for _ , regionalAgent := range response .Agents [0 ].AgentDeployments {
536- regions = append (regions , regionalAgent .Region )
537- }
538-
539531 agent := response .Agents [0 ]
540532 lkConfig := config .NewLiveKitTOML (matches [1 ])
541533 lkConfig .Agent = & config.LiveKitTOMLAgentConfig {
542- ID : agent .AgentId ,
543- Regions : regions ,
534+ ID : agent .AgentId ,
544535 }
545536
546537 if err := lkConfig .SaveTOMLFile (workingDir , tomlFilename ); err != nil {
@@ -710,14 +701,8 @@ func updateAgent(ctx context.Context, cmd *cli.Command) error {
710701 return fmt .Errorf ("no agent config found in [%s]" , tomlFilename )
711702 }
712703
713- regions := cmd .StringSlice ("regions" )
714- if len (regions ) != 0 {
715- lkConfig .Agent .Regions = regions
716- }
717-
718704 req := & lkproto.UpdateAgentRequest {
719705 AgentId : lkConfig .Agent .ID ,
720- Regions : lkConfig .Agent .Regions ,
721706 }
722707
723708 secrets , err := requireSecrets (ctx , cmd , false , true )
0 commit comments