Catalyzes the ATP-dependent amidation of the two carboxylate groups at positions a and c of cobyrinate, using either L-glutamine or ammonia as the nitrogen source. Involved in the biosynthesis of the unique nickel-containing tetrapyrrole coenzyme F430, the prosthetic group of methyl-coenzyme M reductase (MCR), which plays a key role in methanogenesis and anaerobic methane oxidation. Catalyzes the ATP-dependent amidation of the two carboxylate groups at positions a and c of Ni-sirohydrochlorin, using L-glutamine or ammonia as the nitrogen source. 2 ATP + cob(II)yrinate + 2 H2O + 2 L-glutamine = 2 ADP + cob(II)yrinate a,c diamide + 2 H(+) + 2 L-glutamate + 2 phosphate 2 ATP + 2 H2O + 2 L-glutamine + Ni-sirohydrochlorin = 2 ADP + 2 H(+) + 2 L-glutamate + Ni-sirohydrochlorin a,c-diamide + 2 phosphate Cofactor biosynthesis; adenosylcobalamin biosynthesis; cob(II)yrinate a,c-diamide from sirohydrochlorin (anaerobic route): step 10/10. Comprises of two domains. The C-terminal domain contains the binding site for glutamine and catalyzes the hydrolysis of this substrate to glutamate and ammonia. The N-terminal domain is anticipated to bind ATP, and cobyrinate or Ni-sirohydrochlorin, and catalyzes the ultimate synthesis of the diamide product. The ammonia produced via the glutaminase domain is probably translocated to the adjacent domain via a molecular tunnel, where it reacts with an activated intermediate. The a and c carboxylates of cobyrinate and Ni-sirohydrochlorin are activated for nucleophilic attack via formation of a phosphorylated intermediate by ATP. CbiA catalyzes first the amidation of the c-carboxylate, and then that of the a-carboxylate. Belongs to the CobB/CbiA family.