Could it be changed so that it can consider recipes you can see instead of just those you have?
That's impossible! Well, sure, it COULD respect (the names of) recipes that you can see, but it CANNOT respect WHAT INGREDIENTS those recipes make use of, because this changes from level to level. Based on my observations, there are some recipes that don't change at all, and recipes where part of the ingredients are the same all the time, but in the context of such an advancement, the AI can't predict the ingredients. Otherwise you as the player would gain additional knowledge from this advancement and that isn't intended.
EDIT: If there was an separate advancement or a new statistics advancement that would reveal all the recipes from the get-go as soon as you entered a level, then this would be possible. Otherwise, not a chance.
How about recipes you are not actively using? E.g. would copper ore get sold when not making copper bars at the time of selling?
Based on the description that Z posted "and that aren't used in recipes", this is a NO. As soon as you found the copper bar recipe, no more copper ore is sold (whether or not you have smelted all the copper bars that you need). At least, this is my interpretation of the description.
Edited 4/12/2021 23:34:55