Who owns the AI model and code after the project?

That depends entirely on your contract. Make sure it clearly assigns ownership of the source code, configuration, prompts, any trained models and your data to your business.