OpenAI’s crawler documentation lists the settings as independent on purpose. A site can allow OAI-SearchBot and disallow GPTBot: searchable in ChatGPT, not offered for training. It can do the opposite. If both are allowed, OpenAI says it may use one crawl for both purposes so it does not fetch twice. A robots.txt that mentions only one of them has made only one decision. The other bot is not mentioned, and the * group, if there is one, is the fallback rather than a named choice.
The user-agent strings are different. GPTBot’s example includes “compatible; GPTBot/” and a link to openai.com/gptbot. OAI-SearchBot’s example includes “compatible; OAI-SearchBot/” and a link to openai.com/searchbot. The version numbers may change. Each publishes its own IP list, gptbot.json and searchbot.json. A log line can be spoofed, so the string alone is not proof. When either bot fetches robots.txt it may add a robots.txt marker so a log without the path can still be told apart.
ChatGPT-User is a third thing, and it is the usual mix-up. OpenAI says that agent fetches a page because a person asked, or because a GPT Action called out, and that robots.txt may not apply. It is not the search opt-out. The search opt-out is OAI-SearchBot. Blocking ChatGPT-User and expecting ChatGPT search to drop the site, or blocking GPTBot and expecting the same, does not follow the document. OpenAI also says a robots.txt change can take about 24 hours to be picked up for search. That is their delay, not a citation.
How to write the file: two groups if you have two decisions, each with the token spelled as OpenAI spells it. Allow or Disallow the paths you mean. Do not invent a group called AI and expect either bot to match it. Do not describe a GPTBot disallow as a block on AI search. Say which token, and what OpenAI says that token does. Silence is a third state, “not mentioned”, and it should be reported that way rather than upgraded to allow or block.
If you want this done on your site, start with Generative engine optimization.